-->
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: 2 OneToOne , EAGER type Entity Bean. multiple bags Error?
PostPosted: Tue Jun 12, 2007 3:50 am 
Newbie

Joined: Thu Feb 16, 2006 9:27 am
Posts: 1
Hi!

I am using JPA on a JBoss 4.2 GA and the underlying Hibernate version is v3.2.1. My RDBMS is MySQL 5!

I have an EJB 3.0 Entity bean and it has 2 relationships of type OneToOne . Fetch Type Eager. 2 diffrent tables
Code:

    @OneToOne(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
    private ClassA insA;
   
    @OneToOne(cascade={CascadeType.ALL}, fetch=FetchType.EAGER)
    private ClassB insB;


Μy application wont deploy if both of these relationships have EAGER Fetch type
Code:
Caused by: org.hibernate.HibernateException: cannot simultaneously fetch multiple bags


Ι am aware of the same proble regarding OneToMany relationships and the proposed solutions , according to this post and several others!

That means that the problem now must be known to OneToOne EAGER relationships as well?

Of course if I make Lazy one of them or remove one of them the app is being deployed!

Any hints would be much appreciated!

_________________
The Java Hellenic User Group
www.jhug.gr


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.