-->
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.  [ 2 posts ] 
Author Message
 Post subject: How to map List in EJB3 using Hibernate?
PostPosted: Thu Apr 07, 2005 4:42 am 
Newbie

Joined: Thu Apr 07, 2005 4:30 am
Posts: 1
Hello all. I've a problem. I'm using Hibernate3, JBoss 4.0.1 (CVS) with EJB3 support.
My problem is next: when I'm trying to deploy EntityBean, contains List as Field I'm getting this Error:

ERROR [Ejb3Module] Starting failed jboss.j2ee:service=EJB3,module=SimpleEntityBean.jar.ejb3
org.hibernate.MappingException: Could not determine type for: java.util.List, for columns: [org.hibernate.mapping.Column(list)]

here is a part of my bean...
@Entity
@Inheritance( discriminatorType=DiscriminatorType.INTEGER, discriminatorValue="1" )
@DiscriminatorColumn( name="discriminator" )
public class SimpleEntityBean
{
private List m_list;

public List getList()
{
return m_list;
}

public void setList( List list)
{
m_list = list;
}
}

How to correct this? I've read that current spec of EJB3 doesn't contain support for java.util.List, but I need this support... :(

Or could you tell me how to implement this support in current EJB3.0 Release?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 07, 2005 10:51 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
HBX-184

But this is not your current problem.
An association has to be explicitly mapped with @OneToMany for example. Plus you have to set targetEntity or better use a generic list.[/url]

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.