-->
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.  [ 2 posts ] 
Author Message
 Post subject: Question about WHERE claise in hbm.xml file
PostPosted: Tue Mar 28, 2006 11:08 am 
Newbie

Joined: Mon Jul 18, 2005 6:57 am
Posts: 12
I've just got a simple question about placing a WHERE clause in the hbm.xml file. I am trying to retrieve all the records based on dates to see if they are active.

ie
<set name="orgUnitUsers"
table="USER_ACCESS"
lazy="true"
inverse="false"
access="field"
where="EFF_DATE < SYSDATE AND END_DATE > SYSDATE">
<key column="ORGANISATIONAL_UNIT_ID" />
<one-to-many class="uk.gov.ch.chips.common.user.User" />
</set>


I get a problem when I put the < into the line as it ends the string statement. I tried &lt; but this caused an error.

Anyone know what I need to put here for the query to work?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 28, 2006 11:48 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Why would "<" end the string? Is it some kind of odd editor you're using? That where clause should work fine.


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