Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [TENEO] Containment References in Lagacy DB
[TENEO] Containment References in Lagacy DB [message #118437] Tue, 15 April 2008 13:32 Go to next message
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hi Martin,

In my ecore model I have a Containment relation. My Legacy DB does not have
theses three Columns needed to store the Container for a contained Object.

Is it anyhow possible to load objects from the DB and Build a Containment
reference out of it?


with kind regards


Torsten Link
Re: [TENEO] Containment References in Lagacy DB [message #118616 is a reply to message #118437] Tue, 15 April 2008 20:14 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Torsten,
What Teneo did before was the following:
one-to-many relation: when a list is loaded the econtainer of the childs is set to point to the parent
one-to-one: when the child is set in the parent (by hibernate) then the econtainer of the child is set.

this also works if the econtainer is not mapped explicitly. Is this what you mean?

A long time back (> 1 year) I disabled this functionality because I assumed that it was not required
as the econtainer is mapped explicitly in the db. However, since then I have added the option to
disable the explicit econtainer columns in the db. Because of this option the disabled functionality
should have been reenabled.
Also for dynamic emf this should be turned on again. I just tried it out and reenabling this
functionality works fine. I will check this in cvs shortly and it will be in a new build later (few
days).

The solution which I implemented only helps if first the parent is read and the child is retrieved
through the parent first.
If the child is read directly from the db (using a query) then it is much harder (i.e. performance
heavy) to set the econtainer (if the econtainer fields are not mapped explicitly). This scenario
won't be handled by Teneo.

Let me know if the above helps or not (I needed to change this anyway).

gr. Martin

torsten link wrote:
> Hi Martin,
>
> In my ecore model I have a Containment relation. My Legacy DB does not have
> theses three Columns needed to store the Container for a contained Object.
>
> Is it anyhow possible to load objects from the DB and Build a Containment
> reference out of it?
>
>
> with kind regards
>
>
> Torsten Link


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: [TENEO] Containment References in Lagacy DB [message #118691 is a reply to message #118616] Wed, 16 April 2008 17:29 Go to previous message
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hi Martin,

that is what I want. :-)

At the moment the childs have no container set. Is it clear to me
that this would only work if I access the Objects top down.

So I will wait for your change.


Thank you

Torsten



Martin Taal wrote:

> Hi Torsten,
> What Teneo did before was the following:
> one-to-many relation: when a list is loaded the econtainer of the childs
> is set to point to the parent one-to-one: when the child is set in the
> parent (by hibernate) then the econtainer of the child is set.
>
> this also works if the econtainer is not mapped explicitly. Is this what
> you mean?
>
> A long time back (> 1 year) I disabled this functionality because I
> assumed that it was not required as the econtainer is mapped explicitly in
> the db. However, since then I have added the option to disable the
> explicit econtainer columns in the db. Because of this option the disabled
> functionality should have been reenabled. Also for dynamic emf this should
> be turned on again. I just tried it out and reenabling this functionality
> works fine. I will check this in cvs shortly and it will be in a new build
> later (few days).
>
> The solution which I implemented only helps if first the parent is read
> and the child is retrieved through the parent first.
> If the child is read directly from the db (using a query) then it is much
> harder (i.e. performance heavy) to set the econtainer (if the econtainer
> fields are not mapped explicitly). This scenario won't be handled by
> Teneo.
>
> Let me know if the above helps or not (I needed to change this anyway).
>
> gr. Martin
>
> torsten link wrote:
>> Hi Martin,
>>
>> In my ecore model I have a Containment relation. My Legacy DB does not
>> have theses three Columns needed to store the Container for a contained
>> Object.
>>
>> Is it anyhow possible to load objects from the DB and Build a Containment
>> reference out of it?
>>
>>
>> with kind regards
>>
>>
>> Torsten Link
>
>
Re: [TENEO] Containment References in Lagacy DB [message #616322 is a reply to message #118437] Tue, 15 April 2008 20:14 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi Torsten,
What Teneo did before was the following:
one-to-many relation: when a list is loaded the econtainer of the childs is set to point to the parent
one-to-one: when the child is set in the parent (by hibernate) then the econtainer of the child is set.

this also works if the econtainer is not mapped explicitly. Is this what you mean?

A long time back (> 1 year) I disabled this functionality because I assumed that it was not required
as the econtainer is mapped explicitly in the db. However, since then I have added the option to
disable the explicit econtainer columns in the db. Because of this option the disabled functionality
should have been reenabled.
Also for dynamic emf this should be turned on again. I just tried it out and reenabling this
functionality works fine. I will check this in cvs shortly and it will be in a new build later (few
days).

The solution which I implemented only helps if first the parent is read and the child is retrieved
through the parent first.
If the child is read directly from the db (using a query) then it is much harder (i.e. performance
heavy) to set the econtainer (if the econtainer fields are not mapped explicitly). This scenario
won't be handled by Teneo.

Let me know if the above helps or not (I needed to change this anyway).

gr. Martin

torsten link wrote:
> Hi Martin,
>
> In my ecore model I have a Containment relation. My Legacy DB does not have
> theses three Columns needed to store the Container for a contained Object.
>
> Is it anyhow possible to load objects from the DB and Build a Containment
> reference out of it?
>
>
> with kind regards
>
>
> Torsten Link


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Re: [TENEO] Containment References in Lagacy DB [message #617780 is a reply to message #118616] Wed, 16 April 2008 17:29 Go to previous message
Torsten Link is currently offline Torsten LinkFriend
Messages: 51
Registered: July 2009
Member
Hi Martin,

that is what I want. :-)

At the moment the childs have no container set. Is it clear to me
that this would only work if I access the Objects top down.

So I will wait for your change.


Thank you

Torsten



Martin Taal wrote:

> Hi Torsten,
> What Teneo did before was the following:
> one-to-many relation: when a list is loaded the econtainer of the childs
> is set to point to the parent one-to-one: when the child is set in the
> parent (by hibernate) then the econtainer of the child is set.
>
> this also works if the econtainer is not mapped explicitly. Is this what
> you mean?
>
> A long time back (> 1 year) I disabled this functionality because I
> assumed that it was not required as the econtainer is mapped explicitly in
> the db. However, since then I have added the option to disable the
> explicit econtainer columns in the db. Because of this option the disabled
> functionality should have been reenabled. Also for dynamic emf this should
> be turned on again. I just tried it out and reenabling this functionality
> works fine. I will check this in cvs shortly and it will be in a new build
> later (few days).
>
> The solution which I implemented only helps if first the parent is read
> and the child is retrieved through the parent first.
> If the child is read directly from the db (using a query) then it is much
> harder (i.e. performance heavy) to set the econtainer (if the econtainer
> fields are not mapped explicitly). This scenario won't be handled by
> Teneo.
>
> Let me know if the above helps or not (I needed to change this anyway).
>
> gr. Martin
>
> torsten link wrote:
>> Hi Martin,
>>
>> In my ecore model I have a Containment relation. My Legacy DB does not
>> have theses three Columns needed to store the Container for a contained
>> Object.
>>
>> Is it anyhow possible to load objects from the DB and Build a Containment
>> reference out of it?
>>
>>
>> with kind regards
>>
>>
>> Torsten Link
>
>
Previous Topic:Two problems @GenericGenerate strategy="foreign" and @ManyToMany
Next Topic:[Teneo] Difficulty extending embeddable types
Goto Forum:
  


Current Time: Sat Dec 21 16:41:57 GMT 2024

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

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

Back to the top