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?
|