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.  [ 1 post ] 
Author Message
 Post subject: where= in set mapping
PostPosted: Mon Jun 27, 2005 6:42 am 
Newbie

Joined: Mon Jun 27, 2005 6:31 am
Posts: 1
Using this mapping:

Code:
<set name="paymentMethods" table="country_payment_method">
   <key column="code"/>
   <many-to-many
      column="payment_method_id"
      class="PaymentMethod"
      where="active = true"
   />
</set>


I get a Postgres error from the following generated SQL:

Code:
select paymentmet0_.code as code1_, paymentmet0_.payment_method_id as payment2_1_, paymentmet1_.id as id0_, paymentmet1_.broker as broker9_0_, paymentmet1_.label as label9_0_, paymentmet1_.fee as fee9_0_, paymentmet1_.free as free9_0_, paymentmet1_.active as active9_0_, paymentmet1_.merchant_identifier as merchant7_9_0_, paymentmet1_.username as username9_0_, paymentmet1_.password as password9_0_ from country_payment_method paymentmet0_ inner join payment_method paymentmet1_ on paymentmet0_.payment_method_id=paymentmet1_.id where  paymentmet1_.active=paymentmet1_.true and paymentmet0_.code=?


It seems like the "true" literal value is being treated as a field name. This looks like a bug to me. Should I report it?

bye
John


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.