-->
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: Query on composite keys?
PostPosted: Mon Dec 07, 2009 12:25 am 
Newbie

Joined: Mon Dec 07, 2009 12:14 am
Posts: 2
Hello,

I am running into difficulties running queries on Hibernate mapped class/tables that have composite keys defined. When I query by criteria, I can query on all the class's properties except those that are part of the composite key. In fact when I interrogate the Hibernate class metadata via the SessionFactory, the properties in the composite key don't even show up. These tables are shared between legacy apps that won't allow changing the table structure (key setup) and and new apps using Hibernate, so I need to find a way to allow query of the properties in the composite key with Hibernate. Is there a way to do this, other than setting up a view (entity-name) and a query on it instead? What is the reason not being able to query composite key properties in Hibernate mapped classes, if that is the case?

Thanks in advance for you help,

Scott


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.