These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: NHibernate.Expression.Expression Question
PostPosted: Mon Apr 21, 2008 4:29 pm 
Newbie

Joined: Mon Apr 21, 2008 4:20 pm
Posts: 2
Location: Marlborough, MA
Hibernate version:1.2.0

I see that the Java version of Hibernate has a "Ne" (Not Equal) Criteria, is there an equivalent in the .NET 2.0 version of NHibernate? I tried doing something like:

NHibernate.Expression.Expression.Not(NHibernate.Expression.Expression.Eq("propertyName", "value"));

But it doesn't seem to work. I see through use of the reflector that there is a "NHibernate.Expression.Expression.NeExpression" but no "NHibernate.Expression.Expression.Ne".. Is this something planned for a future release or is there a viable workable solution that I can use?

Please advise..


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 22, 2008 2:11 am 
Regular
Regular

Joined: Thu Mar 06, 2008 5:06 am
Posts: 68
use this: Expression.Not(Expression.Eq(...))


Top
 Profile  
 
 Post subject: Fixed
PostPosted: Tue Apr 22, 2008 10:06 am 
Newbie

Joined: Mon Apr 21, 2008 4:20 pm
Posts: 2
Location: Marlborough, MA
Originally it would seem our schema was out of whack and when I tried the aforementioned code it didn't function properly, however, last night I tested the code again and it worked properly.

Thank you "typhos" your answer is correct as well as it is exactly the same as what I had posted :-P

Consider this question resolved


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 23, 2008 2:04 am 
Regular
Regular

Joined: Thu Mar 06, 2008 5:06 am
Posts: 68
Oh, I think my eyes are getting old :-p


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.