-->
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: WHERE clause in map
PostPosted: Mon Jan 26, 2004 10:27 am 
Beginner
Beginner

Joined: Tue Nov 11, 2003 4:49 am
Posts: 47
Location: Florence, Italy
I wanted to use a WHERE clause in my <map>, cause I had, for the same kind of data, some limitations on the time.
For instance, I used to filter on the date and added this string:

<map ..... where="dataInizio<SYSDATE AND datafine>SYSDATE" >

but when Hibernate parse my WHERE SQL I can see that the Oracle SYSDATE is substituted with an alias of the class from where the map is loaded.
What can be wrong ? Is not SQL what I have to write into WHERE clause ?
Thank you for your help.
L.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 4:23 am 
Beginner
Beginner

Joined: Tue Nov 11, 2003 4:49 am
Posts: 47
Location: Florence, Italy
Ok, no one helped me, so I solved my way.
I had to use a PL/SQL function, cause I think there is a bug in Template.renderWhereStringTemplate.
There the code check for an identifier without looking in the Dialect function table.
Doing so, the SYSDATE is always considered like an identifier, and "templated".
Do you think this behavious/checking can be added to this method ?
Ciao.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 7:26 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can you post that to JIRA, please ?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 30, 2004 3:51 pm 
Beginner
Beginner

Joined: Tue Nov 11, 2003 4:49 am
Posts: 47
Location: Florence, Italy
Done.
Ciao.


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.