Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF & hiberate, one-to-many mapping
EMF & hiberate, one-to-many mapping [message #709982] Thu, 04 August 2011 14:54 Go to next message
lee.huddleston is currently offline lee.huddlestonFriend
Messages: 1
Registered: August 2011
Junior Member
Hi, I'm getting the following error when using a project mapped via Teneo onto hibernate:

java.lang.IllegalArgumentException: Can not set org.eclipse.emf.common.util.EList field emftest.impl.Entity1Impl.attr to org.hibernate.collection.PersistentList

attr is of type EList<> and is auto-generated by the model code generator in EMF. Hibernate is trying to assign a PersistentList collection to this and cannot.

Is there some kind of custom mapping that needs to be setup for this to work?

Thanks, Lee

Re: EMF &amp; hiberate, one-to-many mapping [message #711708 is a reply to message #709982] Sat, 06 August 2011 14:22 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Lee,
A later reply because I was on holiday. I think that you are not using a Hibernate session created by the SessionFactory
provided by the Teneo datastore. How are you getting the hibernate session?

gr. Martin

On 08/04/2011 04:54 PM, lee.huddleston wrote:
> Hi, I'm getting the following error when using a project mapped via Teneo onto hibernate:
>
> java.lang.IllegalArgumentException: Can not set org.eclipse.emf.common.util.EList field emftest.impl.Entity1Impl.attr to
> org.hibernate.collection.PersistentList
>
> attr is of type EList<> and is auto-generated by the model code generator in EMF. Hibernate is trying to assign a
> PersistentList collection to this and cannot.
>
> Is there some kind of custom mapping that needs to be setup for this to work?
>
> Thanks, Lee
>
>


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
Previous Topic:(no subject)
Next Topic:Persistence: loading whole object before adding it
Goto Forum:
  


Current Time: Fri Apr 19 20:19:37 GMT 2024

Powered by FUDForum. Page generated in 0.02231 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top