-->
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: many to many mapping and exclude table from being inserted
PostPosted: Sun Dec 30, 2012 6:16 pm 
Newbie

Joined: Sun Dec 30, 2012 6:10 pm
Posts: 1
I have a problem with a table that gets an insert that I don't want.
There are 3 tables: Users, Newsletters and a join Users_has_Newsletters.
The Newsletters table has already some values.
On my registration form I get the values from the Newsletters table to create an option list.

When a user registers I save everything to my DB.
I've defined a many to many mapping in my Users hbm file.

Every time I save my data, I also insert the newsletters they've selected into the Newsletters table, but I don't want that to happen.
I only want my Users and Users_has_Newsletters tables to get inserted with the values.

Is it possible to do this?
Is using a many to many mapping the correct thing to do?

Regards,
Heino.


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.