-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: The ENUM type of Postgre (DB) is not being handled properly in RepoDb.PostgreSql. #395
Comments
This is related to what you reported in #390. I myself encountered this and trying to understand more why it is passing on my Integration Tests and failing on this small project. @ffandreassoroko |
@ffandreassoroko - I now have fixed this on my DEV machine by setting the NpgsqlDbType property to Unknown. [Map("person")]
private class Person
{
public long id { get; set; }
public string name { get; set; }
[NpgsqlTypeMapAttribute(NpgsqlDbType.Unknown)]
public Hands usedhands { get; set; }
} That should also fix yours. |
yes, that works! |
Great. I will close this one now. Thanks! |
@mikependon This still doesn't work if the enum is used in the where clause: var people = connection.Query<Person>(where: p => p.DominantHand == Hand.Right);
//I've been renaming stuff to understand why my main program failed when this snipped didn't results in:
|
@orthoxerox - what is the data type of Note: If the data type is different, then this issue is prevalent to Postgre SQL in which I reported directly to the Npgsql team (Shay Rojansky). |
It's ENUM:
|
Had you tried this on your model |
Yes, I copied the model from your example in this issue:
|
The codes below must be working, but it is now.
The text was updated successfully, but these errors were encountered: