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