Hi Everyone,

I am using ManyToMany bidirectional relationship, fragment of code is given 
below for help:

In One Entity i am coding as:

@ManyToMany(cascade=CascadeType.REFRESH, fetch=FetchType.EAGER)        
        @JoinTable(name="trd_t_sess_nommem",joinColumns = 
@JoinColumn(name="trs_trnsessnid_n_fk"),inverseJoinColumns = 
@JoinColumn(name="tnm_nommemid_n_fk"))
        public Set getNominatedmembersentity(){
                return nominatedmembersentity;
        }
        /**
         * @param nominatedmembersentity the nominatedmembersentity to set
         */
        public void setNominatedmembersentity(
                        Set nominatedmembersentity) {
                this.nominatedmembersentity = nominatedmembersentity;
        }

At other entity i am coding as given below:


@ManyToMany(mappedBy="nominatedmembersentity")
        public List getTrainingsessionentity() {
                return trainingsessionentity;
        } 


But at the built time i am receiving the following error:


--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=training.ear,jar=training.jar,unitName=intro
  State: FAILED
  Reason: javax.persistence.PersistenceException: 
org.hibernate.HibernateException: cannot simultaneously fetch multiple bags
  I Depend On:
    jboss.jca:service=DataSourceBinding,name=PostgresDS

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156603#4156603

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156603
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to