Hello,
Is it possible to use postgresql native ENUM type in ormlite typed sql expressions?
CREATE TYPE my_enum_type AS ENUM ('some_value', 'other_value'');
I have tried using CustomField attribute
public class Table1
{
[Autoincrement]
public int Id { get; set; }
[CustomField["my_enum_type")]
public SomeEnum MyEnumField { get; set; }
}
public enum SomeEnum { SomeValue, OtherValue };
on inserting with
Db.Insert( new Table { SomeEnum = SomeEnum.SomeValue }
it throws error:
column “my_enum_field” is of type my_enum_type but expression is of type text
Thanks,
Dejan