-->
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 makes hibernate-core dependency on client side ?
PostPosted: Wed Nov 11, 2009 3:14 pm 
Newbie

Joined: Wed Nov 11, 2009 11:19 am
Posts: 1
Hello all,

thank you for all the work making this community around hibernate,
and keep up the good work!

I have a problem on one of my projects, I cannot run the client application
without hibernate-core.jar in the class path.

My server side uses JBoss + EJB + Hibernate (Jboss 5 GA and Hibernate 3).

I do have those kinds of entities :

Code:
@Entity
@Table(name="Biz_MyChunk", uniqueConstraints={@UniqueConstraint(columnNames={"name"})})
public class MyChunk extends ItemEntity {
   
   @Column(nullable=false)
   private String name;
   
   @ManyToMany
   @JoinTable(name="Biz_M_CC",joinColumns=@JoinColumn(name="MyChunk_Id"),inverseJoinColumns=@JoinColumn(name="CC_Id"))
   private List<ChunkBit> listeConteneurCase;
}


When I use an EntityManager, like this :

Code:
Query query = entityManager.createQuery("select m from MyChunk m");
List<MyChunk> entites = query.getResultList();


I get back a PersistentBag, which is only defined in hibernate-core.jar, and thus my application crashes.
If I add hibernate-core.jar on the client side, everything is fine.

I don't know if this is normal.

Thank you for your help.

Regards


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.