-->
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: no-primary-key-table mapping
PostPosted: Fri Sep 26, 2003 9:27 am 
Newbie

Joined: Wed Sep 17, 2003 6:34 am
Posts: 3
Hello,

I have a simple question.
If I have a table which has no key definition, and if I try to map this, what happens? I mean, can hibernate handle tables without key definition?

Actually I already tried such a thing, because I have some tables to map which have no keys, and I am not allowed to change. I could save new instances to db, but in querying there were problems.

Sunay


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 26, 2003 3:44 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
It does not need physical PKs. It would need some means of uniquely identifing rows. The typical approach is to map it using a composite key which aggregates the columns that make the row unique.


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.