-->
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: How can I do a mapping for Table without primary Key ?
PostPosted: Wed Apr 26, 2006 11:01 am 
Newbie

Joined: Fri Apr 21, 2006 9:57 am
Posts: 3
Hello,

I have tables in an existing DB wich don't have primary key,

they do links between many tables with Foreign Keys nullable and others attributes.

there is just constraints (indexes) on these tables about the combination
of the foreign keys.

the problem is to load datas from these tables when I will do a find all
... "from myTable"

if there are many records with the same "primary key" (which I have define a composite-Id in my mapping file) the number of objects in the List is right (the same number of records in database) but the records which have the same primary key are the same object in all the List.

what can i do to resolve this problem ?

could you help me ?

thx


Top
 Profile  
 
 Post subject: without primary key u can do
PostPosted: Wed Apr 26, 2006 11:26 am 
Beginner
Beginner

Joined: Mon Mar 27, 2006 5:25 am
Posts: 39
Location: India Hyderabad
Hi Friend,

As of my experience there is no table without having the primary keys in the real time senarios.
Even hibernate wont supports if id doesnt have the primary key.
U cant do anything.

--------------------------------------------
Dont forget to rate


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.