Skip to content
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

Where queries with casted enum value throw Can't write CLR type #558

Closed
quicoli opened this issue Aug 1, 2018 · 2 comments
Closed

Where queries with casted enum value throw Can't write CLR type #558

quicoli opened this issue Aug 1, 2018 · 2 comments

Comments

@quicoli
Copy link

quicoli commented Aug 1, 2018

I'm using NHibernate in a .net core webapi and I get the error:

System.InvalidCastException: Can't write CLR type VehicleTypes with handler type Int32Handler

Before changing to PostgreSQL I was using SQL Server and I hadn't this issue.

I have a table with a int column, and in my model this column is a Enum value. I can't retrieve values now because of this error...

NHibernate 5.1.3
Npgsql 4.0.2

Related

#489

@austindrenski
Copy link
Contributor

@quicoli Does your project use EF Core? If not, could you reopen this in https://github.com/npgsql/npgsql?

@austindrenski
Copy link
Contributor

Closing as no additional info was provided within 7 days.

Please feel free to post back here with the relevant information and we can reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants