MultipleBagFetchException « Annotation « JPA Q&A





1. How to prevent having org.hibernate.loader.MultipleBagFetchException    stackoverflow.com

I get the following exception:

org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags
the bean I use is:
@Entity
@Table(name="user") public class User implements Serializable {
/**
 * 
 */
private static final long serialVersionUID = -5689970869179555442L;

@Id
@Column(name="username")
/*@NotNull*/
private String ...