-->
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: Delete association rows MAnytoMany
PostPosted: Mon Dec 21, 2015 6:41 am 
Newbie

Joined: Fri Oct 02, 2015 6:11 am
Posts: 6
Hi. I have a problem. I have a ManyToMany

Code:
@Entity
public class TaxonObjects extends AbstractClannObject{

   private String tag;

   @ManyToMany(fetch = FetchType.EAGER, cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.REMOVE})
   @JoinTable(name = "TaxonConnect", joinColumns = {
         @JoinColumn(name = "taxonObjectsId", nullable = false, updatable = false) },
         inverseJoinColumns = { @JoinColumn(name = "taxonId",
               nullable = false, updatable = false) })
   private Set<Taxon>listTaxon;


Code:
@Entity
public class Taxon extends AbstractClannObject {
   
        private String settore;
   ManyToMany(fetch = FetchType.EAGER,mappedBy="listTaxon")
   private Set<TaxonObjects> listTaxonObjects;



I passed the tag in the removeFuction and i want delete the association in TaxonConnect that exists between tag in TaxonObject and sector in Taxon.

How can it be done?

Thanks


Top
 Profile  
 
 Post subject: Re: Delete association rows MAnytoMany
PostPosted: Mon Dec 21, 2015 6:58 am 
Beginner
Beginner

Joined: Thu Nov 26, 2015 11:40 am
Posts: 33
Can you post the "removeFuction" where you are passing "tag" as an argument.


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.