2

I have a PK (character (10)), that is mapped like that:

The load works fine with npgsql 1.0, the sql generated with loadbyid is :

SELECT city0_."IDCity" as IDMu1_92_0_ FROM "tblCity" city0_ WHERE city0_."IDCity"=E'BR420240'

Using npgsql 2.0. the sql generated is :

SELECT city0_."IDCity" as IDMu1_92_0_ FROM "tblCity" city0_ WHERE city0_."IDCity"='BR420240'::text

So, I got ObjectNotFoundException, because that SQL returns 0 results...

Npgsql developer told-me to specify the exact type to the PK, in that case : character(10)...

How can I do that using NH? I tried use sql-type, but I think it only exist in Hibernate...

Thanks

1 Answer 1

2

It is a NHibernate bug...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.