Hey,
I just updated from NH 3.0 to NH 3.2. (downloaded from the site, not
nuget)
I'm developing in c# 3.5, working on a winforms project.
my database is mysql (5.1.42-community)
------
after the updated the following query ( or any other queryover with
involves enum):
Session.QueryOver<Entity>().Where(e => e.Type !=
Entity.EntityType.General).List();
throws the following exception:
Cannot interpret member from ConvertChecked(e.Type)
   at
NHibernate.Impl.ExpressionProcessor.IsMemberExpression(Expression
expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 346
   at
NHibernate.Impl.ExpressionProcessor.FindMemberProjection(Expression
expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 166
   at
NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(Expression
left, Expression right, ExpressionType nodeType) in d:\CSharp\NH\NH
\nhibernate\src\NHibernate\Impl\ExpressionProcessor.cs:line 414
   at
NHibernate.Impl.ExpressionProcessor.ProcessSimpleExpression(BinaryExpression
be) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 409
   at
NHibernate.Impl.ExpressionProcessor.ProcessBinaryExpression(BinaryExpression
expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 506
   at NHibernate.Impl.ExpressionProcessor.ProcessExpression(Expression
expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 580
   at
NHibernate.Impl.ExpressionProcessor.ProcessLambdaExpression(LambdaExpression
expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Impl
\ExpressionProcessor.cs:line 587
   at NHibernate.Impl.ExpressionProcessor.ProcessExpression[T]
(Expression`1 expression) in d:\CSharp\NH\NH\nhibernate\src\NHibernate
\Impl\ExpressionProcessor.cs:line 598
   at NHibernate.Criterion.QueryOver`2.Add(Expression`1 expression) in
d:\CSharp\NH\NH\nhibernate\src\NHibernate\Criterion\QueryOver.cs:line
749
   at NHibernate.Criterion.QueryOver`2.Where(Expression`1 expression)
in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Criterion
\QueryOver.cs:line 357
   at
NHibernate.Criterion.QueryOver`2.NHibernate.IQueryOver<TRoot,TSubType>.Where(Expression`1
expression) in

the enum is:
        public enum EntityType
        {
            v1 = 0,
            v2 = 1,
            ....
            General = 999
        }

Property code:

        public virtual EntityType Type
        {
            get { return type; }
            set { type = value; }
        }


the mapping for it is:
<property name="Type" column="ENT_TYPE"/>
the column is an integer in the database.

i saw a jira bug that was fixed (https://nhibernate.jira.com/browse/
NH-2712) and another on (https://nhibernate.jira.com/browse/NH-2763)
that isn't, but both says vb.net.
I tried marking that column as not-null (both mapping and updated the
db) but it didn't helped.

any ideas why it does not work and more important, what i need to do
in order to fix it?

Thanks,
Nadav

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to