[TENEO] Containment References in Lagacy DB [message #118437] |
Tue, 15 April 2008 09:32  |
Eclipse User |
|
|
|
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 #118691 is a reply to message #118616] |
Wed, 16 April 2008 13:29  |
Eclipse User |
|
|
|
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 16:14  |
Eclipse User |
|
|
|
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 13:29  |
Eclipse User |
|
|
|
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
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04347 seconds