-->
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: Can ManyToMany annotation have keys?
PostPosted: Fri Oct 05, 2007 5:42 am 
Newbie

Joined: Mon Nov 21, 2005 6:15 am
Posts: 14
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.2.3.ga

I am having a ManyToMany table and I have customised the table name and the column names using the @JoinTable annoation.

We have a custom replication component at database level, and we use primary keys to replicate rows(primary keys are used to determine whether they are to be inserted or updated in target database). However our schema, has many-to-many mapping which as such have a composite primary key and do not have an "id" column.

Is it possible to include an id column in the ManyToMany Table and with generated key values.

One option would be to refactor the domain model to not have many to many and introduce a new entity. But I would like to know if there are better solutions?


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.