-->
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: Cant use composite id with native sql query and mapping
PostPosted: Fri Oct 28, 2011 2:06 pm 
Newbie

Joined: Mon May 11, 2009 8:42 am
Posts: 5
I've been trying to use a sql result set mapping to return entities with a composite key but to no avail; Hibernate is using names for the composite key columns that aren't found in the query, specified in the sql result set mapping or @Column annotations. I also tried @AttributeOverrides but those are ignored. The query uses some Oracle specific stuff so I need to use a native sql query.

When I rework the query and sql result mapping to use the column names Hibernate is looking for, I find the column names Hibernate is looking for aren't consistent. I run one set of unit tests and Hibernate is looking for columns "name3_0_" and "coordinate1_3_0_", if I run all the unit tests Hibernate is looking for columns "name3_0_" and "coordinate1_39_0_".

I've tried a couple of versions of Hibernate but its the same problem. Any ideas? Is this clearly not supported or just one of those weird corner cases?


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.