Only a gutfeel. If it works then fails, upgrade - it works then it fails - 
it must be your code and probably is dynamic and data dependent. Write a 
test with defined data and try again.

On Sunday, January 9, 2022 at 6:51:49 PM UTC+2 [email protected] wrote:

> Hi 
>
> I am trying to upgrade C# code from old nHibernate version to latest one. 
> A lot of people with various degree of knowledge in nHibernate was working 
> on this projects so sometimes it used very deeply involved in code of 
> nHibernate and sometimes it is obvious. The upgrade process goes well - 
> usually changes from <bag> to <set> and I learn a lot about nHibernate but 
> there's a very strange error in some query that look like this:
>
> NHibernate.QueryException: 'Type mismatch in 
> NHibernate.Criterion.SimpleExpression: OwnerBusinessUnit expected type 
> BusinessUnit, actual type BusinessUnit'
>
> I am assure you that there's only 1 and only one class named BusinessUnit 
> (the name is shorten because it is private code)
>
> I thought that I found a solution - I changed something in HBM file (it 
> even does not matter what as I found out) and it start to work Ok but then 
> suddenly it start to throw this exception again (??? how come ?). So I 
> found another solution - I upgraded nHibernate nuget package to the latest 
> and everything was working OK then suddenly it start to throw this 
> exception again.
>
> Could someone help me in this situation ? The error message is very 
> confusing and I don't really know where to start looking for solution.....
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nhusers/3991a0cd-3c6a-4473-9f13-496b317b6e31n%40googlegroups.com.

Reply via email to