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.  [ 3 posts ] 
Author Message
 Post subject: Enums in where clause
PostPosted: Wed Jan 07, 2009 11:04 am 
Newbie

Joined: Wed Jan 07, 2009 10:49 am
Posts: 2
Can you do something like this?

Code:
<bag name="Pages" table="DomainObjectNode" where="Type = Cms.Core.Enumerators.ObjectType.Page">


Instead of comparing with integers? Where ObjectType is an enum. Obviously, this code does NOT work .

Exception: "The multi-part identifier "Cms.Core.Enumerators.ObjectType.Page" could not be bound."

/JJ


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2009 1:22 pm 
Beginner
Beginner

Joined: Wed Apr 18, 2007 6:17 pm
Posts: 49
Location: Dominican Republic
Hello, in the where clause must be a sql statement not hql, so try to write the representation of that hql and the value that the enumeration represents to make it work,

regards


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 07, 2009 1:24 pm 
Newbie

Joined: Wed Jan 07, 2009 10:49 am
Posts: 2
Ok so no hql, that's why. Thanks for clearing that up, guess I'll have to stick to the actual int values.

/J


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.