MyEclipse: Hibernate for table without PK [Closed]
ms_lisac - Dec 03, 2004 - 10:27 PM
Post subject: Hibernate for table without PK [Closed]
I created a mapping file, abstract class and concreate class for a table using myEclipse for hibernate. The table does not have a primary key it consists of only foriegn keys in other tables. the problem is that the mapping file does not like it. Is this mapping possible in MyEclipse ? Is this mapping possible in Hibernate?
support-jeff - Dec 04, 2004 - 03:27 AM
You will need to declare a primary key for the table if you want to map it as an entity. However, if the only columns in the table are fk's to other tables, is this not just a many-to-many relation? Hibernate has other ways to manage these that do not involve mapping them directly as an entity. I would check the Hibernate docs for many-to-many relationships.
ms_lisac - Dec 08, 2004 - 11:29 AM
Post subject: Hibernate Question
Thanks, for your help. I'll look in to the documentation. I was confused since I am new to hibernate.
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits