-->
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: ManyToMany is deleting records from seccond table
PostPosted: Thu Apr 03, 2008 2:20 pm 
Newbie

Joined: Thu Apr 03, 2008 1:56 pm
Posts: 4
hi,

I have a question how to set up @ManyToMany relationship if I have a primary table (User) and second table Tag. user can have multiple tags wich are saved in table user_tag.

In class User I have:
@ManyToMany
Sety<Tag> tags;

I would like to know how to set up that every time user adds tags they are saved in table Tag and User_tag and when it removes a tag it is deleted from table User_tag and it is not removed from Tag table.

Thanks for your help.

Uros


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.