-->
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: Bad substitution on class wide where clause
PostPosted: Wed May 05, 2004 1:49 pm 
Newbie

Joined: Tue May 04, 2004 6:34 pm
Posts: 5
I'm trying to use a class wide "where" clause to only retrieve entities that have not been logically deleted using the following snippet in my configuration files.

<class name="UserAccount" table="user_account" where="is_deleted=false">

When hibernate converts this to the sql to send to PostgreSQL it tacks on the table alias in front of the false, breaking the query syntax.

select useraccoun0_.user_id as user_id, useraccoun0_.email_address as email_ad2_, useraccoun0_.password as password, useraccoun0_.receive_html_email as receive_4_, useraccoun0_.is_deleted as is_deleted, useraccoun0_.insert_date as insert_d6_, useraccoun0_.update_date as update_d7_, useraccoun0_.delete_date as delete_d8_ from user_account useraccoun0_ where useraccoun0_.is_deleted=useraccoun0_.false and ((useraccoun0_.email_address=? ))

Is there a solution or a way around this?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 05, 2004 3:07 pm 
Newbie

Joined: Tue May 04, 2004 6:34 pm
Posts: 5
Ok I found a work around, I can set the where clause to the following value "is_deleted='f'" but the substitution probably is a bug.


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.