-->
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: ManyToOne paramenter mapping is not correctly to query
PostPosted: Wed Jun 25, 2008 12:03 pm 
I'm running into an issue where the Set<child> class that has 2 JoinColumn annotations.

The query shows the where clause, but the parameters are being mapped backwards.

where
tpaladdrs0_.PROV_ID=?
and tpaladdrs0_.PAL_ID=?

binding 9876 to parameter: 1
binding 1234 to parameter: 2

1234 should be mapped to PROV_ID.

These are reverse engineered classes, so I'm not even sure where to begin.

The Set in the parent class has the keys in alphabetical order (palId, provId), but in debugging, it looks as if hibernate is simply mapping the parameters via a simple loop, not putting the parameter to the id correctly.

Yes, this explanation is clear as mud.


Top
  
 
 Post subject:
PostPosted: Thu Jun 26, 2008 4:36 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

this is indeed clear as mud ;-) Any of these would help:

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


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.