-->
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.  [ 1 post ] 
Author Message
 Post subject: Criteria Query Question
PostPosted: Thu Feb 09, 2006 8:27 pm 
Newbie

Joined: Tue Jan 17, 2006 8:01 pm
Posts: 1
In the crit.Add expressions below e.EventDate is doing what is expected and limiting the dates of my query correctly, but when I use the same reference in crit.AddOrder it cannot resolve that property

"could not resolve property:EventDate"


crit.CreateAlias("Event", "e");

crit.Add(Expression.Gt("e.EventDate", dtStartDate));
crit.Add(Expression.Lt("e.EventDate", dtEndDate));

NHibernate.Expression.Order ord = new Order("e.EventDate", true);
crit.AddOrder(ord);


In the NHibernate log file I'm getting this:

18:17:35.808 [2196] INFO NHibernate.Persister.GetSetHelperFactory - Disabling reflection optimizer for class eventApprovalHibernateLib.Event
18:17:35.808 [2196] DEBUG NHibernate.Persister.GetSetHelperFactory - CodeDOM compilation failed
System.NullReferenceException: Object reference not set to an instance of an object.
at NHibernate.Persister.GetSetHelperFactory.GenerateCode()
at NHibernate.Persister.GetSetHelperFactory.CreateGetSetHelper()

I'm using NHibernate version - v1.1.4322

This seems very strange to me. I must be missing something.


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

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.