|Re: Hibernate EList [message #925004 is a reply to message #924976]
||Thu, 27 September 2012 09:52
| Martin Taal
Registered: July 2009
Hibernate can handle nm associations. The wiki page you refer to discusses this, it needs join tables that's all. But
this is done automatically by Teneo.
I think you create an EAttribute but you should create an EReference with upperbound -1 on both sides of the association
and as an etype use your own eclass (User) and not EEList. So it is not necessary to use EEList in your ecore file directly.
Teneo will automatically take care of creating join tables etc.
See also this page for related options:
On 09/27/2012 11:25 AM, zainab alhaidary wrote:
> hello everybody,
> I'm using Teneo/Hibernate to map my data model to a Oracle database,
> within the model I have a many-to-many relation, according to this http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Association_Mapping
> hibernate cannot handle nm relations therefor I have to separate them into two tables and use Elist (org.eclipse.emf.common.util.EList). Now my problem is in persisting the entities in the Elist. It seems that the mapping didn't really map the Elist. Thats why when I try to insert a value then to to get it later on it gives me null as a result.
> here is a photo to explain what I mean:
> Can anyone please let me know where can I refer to regarding the Elists and how to use then properly?
> Thank You
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.02101 seconds