Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Teneo] Persisting an Ecore Model
[Teneo] Persisting an Ecore Model [message #84695] Thu, 24 May 2007 06:19 Go to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

I have been trying to persist a bunch of data (each to its own database)
and the corresponding Ecore model to which each of the datasets conforms
(each Ecore model would be persisted to its own database). At some
point in the future I plan on loading one of the datasets, but before I
can load the dataset, I need to load the ecore model. So the algorithm
is basically:

determine what dataset I need
create a hbds with EcorePackage and XMLTypePackage as the ePackages
do query("from ecore_EObject as EObject where dtype='EPackage'");
create a hbds with the result of the query as the ePackage
query the new hbds on the instance data

However, when I loaded the ePACKAGE I received a number of errors
because it seems that the eTypes are not persisted. In order to get
this to work, I had to add the following lines when I persisted the
models, and again, when I load them back:

EcorePackage.eINSTANCE.getETypedElement().getEStructuralFeat ure(EcorePackage.ETYPED_ELEMENT__ETYPE).setVolatile(false);
EcorePackage.eINSTANCE.getEClass().getEStructuralFeature(Eco rePackage.ECLASS__INSTANCE_CLASS_NAME).setVolatile(false);

I am posting this here in case others have similar problems.

Martin, Ed, does this make sense to you guys?

cheers,
ian
Re: [Teneo] Persisting an Ecore Model [message #84710 is a reply to message #84695] Thu, 24 May 2007 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ian,

I wouldn't expect that the volatile setting should affect
serialization. Making something volatile should only affect code
generation and has (should have) no direct implication that the feature
is derived or transient. I would expect that only the transient setting
should affect serialization. (Of course what I expect and what actually
is might not match.)


Ian Bull wrote:
> I have been trying to persist a bunch of data (each to its own
> database) and the corresponding Ecore model to which each of the
> datasets conforms (each Ecore model would be persisted to its own
> database). At some point in the future I plan on loading one of the
> datasets, but before I can load the dataset, I need to load the ecore
> model. So the algorithm is basically:
>
> determine what dataset I need
> create a hbds with EcorePackage and XMLTypePackage as the ePackages
> do query("from ecore_EObject as EObject where dtype='EPackage'");
> create a hbds with the result of the query as the ePackage
> query the new hbds on the instance data
>
> However, when I loaded the ePACKAGE I received a number of errors
> because it seems that the eTypes are not persisted. In order to get
> this to work, I had to add the following lines when I persisted the
> models, and again, when I load them back:
>
> EcorePackage.eINSTANCE.getETypedElement().getEStructuralFeat ure(EcorePackage.ETYPED_ELEMENT__ETYPE).setVolatile(false);
>
> EcorePackage.eINSTANCE.getEClass().getEStructuralFeature(Eco rePackage.ECLASS__INSTANCE_CLASS_NAME).setVolatile(false);
>
>
> I am posting this here in case others have similar problems.
>
> Martin, Ed, does this make sense to you guys?
>
> cheers,
> ian
Re: [Teneo] Persisting an Ecore Model [message #84725 is a reply to message #84710] Thu, 24 May 2007 13:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ed,

It used to be, that in an EStructuralFeature

isVolatile && isTransient && !isChangeable

indicated that a feature was derived (before the isDerived attribute was
introduced). Does that interpretation still hold in some places? How does
EMF deal with models created before isDerived came into being?

Cheers,

Christian


Ed Merks wrote:

> Ian,
>
> I wouldn't expect that the volatile setting should affect
> serialization. Making something volatile should only affect code
> generation and has (should have) no direct implication that the feature
> is derived or transient. I would expect that only the transient setting
> should affect serialization. (Of course what I expect and what actually
> is might not match.)
>
>

<snip>
Re: [Teneo] Persisting an Ecore Model [message #84741 is a reply to message #84725] Thu, 24 May 2007 13:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

This is a multi-part message in MIME format.
--------------010104050407010800020408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Christian,

The core runtime doesn't use isVolatile for anything. Arguably it
should never have been a property in Ecore itself but rather should
have been a generator property, i.e., it should have been a property on
the GenFeature since it has no meaningful impact outside of generated code.


Christian W. Damus wrote:
> Hi, Ed,
>
> It used to be, that in an EStructuralFeature
>
> isVolatile && isTransient && !isChangeable
>
> indicated that a feature was derived (before the isDerived attribute was
> introduced). Does that interpretation still hold in some places? How does
> EMF deal with models created before isDerived came into being?
>
> Cheers,
>
> Christian
>
>
> Ed Merks wrote:
>
>
>> Ian,
>>
>> I wouldn't expect that the volatile setting should affect
>> serialization. Making something volatile should only affect code
>> generation and has (should have) no direct implication that the feature
>> is derived or transient. I would expect that only the transient setting
>> should affect serialization. (Of course what I expect and what actually
>> is might not match.)
>>
>>
>>
>
> <snip>
>


--------------010104050407010800020408
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
The core runtime doesn't use isVolatile for anything.&nbsp; Arguably it
should never have been a property in Ecore itself&nbsp; but rather should
have been a generator property, i.e., it should have been a property on
the GenFeature since it has no meaningful impact outside of generated
code.<br>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="midf345fr$hm0$1@build.eclipse.org" type="cite">
<pre wrap="">Hi, Ed,

It used to be, that in an EStructuralFeature

isVolatile &amp;&amp; isTransient &amp;&amp; !isChangeable

indicated that a feature was derived (before the isDerived attribute was
introduced). Does that interpretation still hold in some places? How does
EMF deal with models created before isDerived came into being?

Cheers,

Christian


Ed Merks wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Ian,

I wouldn't expect that the volatile setting should affect
serialization. Making something volatile should only affect code
generation and has (should have) no direct implication that the feature
is derived or transient. I would expect that only the transient setting
should affect serialization. (Of course what I expect and what actually
is might not match.)


</pre>
</blockquote>
<pre wrap=""><!---->
&lt;snip&gt;
</pre>
</blockquote>
<br>
</body>
</html>

--------------010104050407010800020408--
Re: [Teneo] Persisting an Ecore Model [message #84756 is a reply to message #84741] Thu, 24 May 2007 14:40 Go to previous messageGo to next message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Thanks Ian for letting us know.
The reason that Teneo uses it is that for jpox it is required to have an actual member in the
generated code. For hibernate this is less of an issue.
Ian, can you enter a bugzilla for this on Teneo
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT

Then I can let Teneo handle this better.

gr. Martin

Ed Merks wrote:
> Christian,
>
> The core runtime doesn't use isVolatile for anything. Arguably it
> should never have been a property in Ecore itself but rather should
> have been a generator property, i.e., it should have been a property on
> the GenFeature since it has no meaningful impact outside of generated code.
>
>
> Christian W. Damus wrote:
>> Hi, Ed,
>>
>> It used to be, that in an EStructuralFeature
>>
>> isVolatile && isTransient && !isChangeable
>>
>> indicated that a feature was derived (before the isDerived attribute was
>> introduced). Does that interpretation still hold in some places? How does
>> EMF deal with models created before isDerived came into being?
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Ed Merks wrote:
>>
>>
>>> Ian,
>>>
>>> I wouldn't expect that the volatile setting should affect
>>> serialization. Making something volatile should only affect code
>>> generation and has (should have) no direct implication that the feature
>>> is derived or transient. I would expect that only the transient setting
>>> should affect serialization. (Of course what I expect and what actually
>>> is might not match.)
>>>
>>>
>>>
>>
>> <snip>
>>
>


--

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] Persisting an Ecore Model [message #84770 is a reply to message #84756] Thu, 24 May 2007 16:32 Go to previous message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Done:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188973

Thanks guys!
p.s. EMF / EMFT / Eclipse Modeling ROCKS!!!

Martin Taal wrote:
> Hi,
> Thanks Ian for letting us know.
> The reason that Teneo uses it is that for jpox it is required to have an
> actual member in the generated code. For hibernate this is less of an
> issue.
> Ian, can you enter a bugzilla for this on Teneo
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT
>
> Then I can let Teneo handle this better.
>
> gr. Martin
>
> Ed Merks wrote:
>> Christian,
>>
>> The core runtime doesn't use isVolatile for anything. Arguably it
>> should never have been a property in Ecore itself but rather should
>> have been a generator property, i.e., it should have been a property
>> on the GenFeature since it has no meaningful impact outside of
>> generated code.
>>
>>
>> Christian W. Damus wrote:
>>> Hi, Ed,
>>>
>>> It used to be, that in an EStructuralFeature
>>>
>>> isVolatile && isTransient && !isChangeable
>>>
>>> indicated that a feature was derived (before the isDerived attribute was
>>> introduced). Does that interpretation still hold in some places?
>>> How does
>>> EMF deal with models created before isDerived came into being?
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>
>>>> Ian,
>>>>
>>>> I wouldn't expect that the volatile setting should affect
>>>> serialization. Making something volatile should only affect code
>>>> generation and has (should have) no direct implication that the feature
>>>> is derived or transient. I would expect that only the transient
>>>> setting
>>>> should affect serialization. (Of course what I expect and what
>>>> actually
>>>> is might not match.)
>>>>
>>>>
>>>>
>>>
>>> <snip>
>>>
>>
>
>
Re: [Teneo] Persisting an Ecore Model [message #606777 is a reply to message #84695] Thu, 24 May 2007 13:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31770
Registered: July 2009
Senior Member
Ian,

I wouldn't expect that the volatile setting should affect
serialization. Making something volatile should only affect code
generation and has (should have) no direct implication that the feature
is derived or transient. I would expect that only the transient setting
should affect serialization. (Of course what I expect and what actually
is might not match.)


Ian Bull wrote:
> I have been trying to persist a bunch of data (each to its own
> database) and the corresponding Ecore model to which each of the
> datasets conforms (each Ecore model would be persisted to its own
> database). At some point in the future I plan on loading one of the
> datasets, but before I can load the dataset, I need to load the ecore
> model. So the algorithm is basically:
>
> determine what dataset I need
> create a hbds with EcorePackage and XMLTypePackage as the ePackages
> do query("from ecore_EObject as EObject where dtype='EPackage'");
> create a hbds with the result of the query as the ePackage
> query the new hbds on the instance data
>
> However, when I loaded the ePACKAGE I received a number of errors
> because it seems that the eTypes are not persisted. In order to get
> this to work, I had to add the following lines when I persisted the
> models, and again, when I load them back:
>
> EcorePackage.eINSTANCE.getETypedElement().getEStructuralFeat ure(EcorePackage.ETYPED_ELEMENT__ETYPE).setVolatile(false);
>
> EcorePackage.eINSTANCE.getEClass().getEStructuralFeature(Eco rePackage.ECLASS__INSTANCE_CLASS_NAME).setVolatile(false);
>
>
> I am posting this here in case others have similar problems.
>
> Martin, Ed, does this make sense to you guys?
>
> cheers,
> ian


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Teneo] Persisting an Ecore Model [message #606778 is a reply to message #84710] Thu, 24 May 2007 13:55 Go to previous message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Ed,

It used to be, that in an EStructuralFeature

isVolatile && isTransient && !isChangeable

indicated that a feature was derived (before the isDerived attribute was
introduced). Does that interpretation still hold in some places? How does
EMF deal with models created before isDerived came into being?

Cheers,

Christian


Ed Merks wrote:

> Ian,
>
> I wouldn't expect that the volatile setting should affect
> serialization. Making something volatile should only affect code
> generation and has (should have) no direct implication that the feature
> is derived or transient. I would expect that only the transient setting
> should affect serialization. (Of course what I expect and what actually
> is might not match.)
>
>

<snip>
Re: [Teneo] Persisting an Ecore Model [message #606779 is a reply to message #84725] Thu, 24 May 2007 13:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31770
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010104050407010800020408
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Christian,

The core runtime doesn't use isVolatile for anything. Arguably it
should never have been a property in Ecore itself but rather should
have been a generator property, i.e., it should have been a property on
the GenFeature since it has no meaningful impact outside of generated code.


Christian W. Damus wrote:
> Hi, Ed,
>
> It used to be, that in an EStructuralFeature
>
> isVolatile && isTransient && !isChangeable
>
> indicated that a feature was derived (before the isDerived attribute was
> introduced). Does that interpretation still hold in some places? How does
> EMF deal with models created before isDerived came into being?
>
> Cheers,
>
> Christian
>
>
> Ed Merks wrote:
>
>
>> Ian,
>>
>> I wouldn't expect that the volatile setting should affect
>> serialization. Making something volatile should only affect code
>> generation and has (should have) no direct implication that the feature
>> is derived or transient. I would expect that only the transient setting
>> should affect serialization. (Of course what I expect and what actually
>> is might not match.)
>>
>>
>>
>
> <snip>
>


--------------010104050407010800020408
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Christian,<br>
<br>
The core runtime doesn't use isVolatile for anything.&nbsp; Arguably it
should never have been a property in Ecore itself&nbsp; but rather should
have been a generator property, i.e., it should have been a property on
the GenFeature since it has no meaningful impact outside of generated
code.<br>
<br>
<br>
Christian W. Damus wrote:
<blockquote cite="midf345fr$hm0$1@build.eclipse.org" type="cite">
<pre wrap="">Hi, Ed,

It used to be, that in an EStructuralFeature

isVolatile &amp;&amp; isTransient &amp;&amp; !isChangeable

indicated that a feature was derived (before the isDerived attribute was
introduced). Does that interpretation still hold in some places? How does
EMF deal with models created before isDerived came into being?

Cheers,

Christian


Ed Merks wrote:

</pre>
<blockquote type="cite">
<pre wrap="">Ian,

I wouldn't expect that the volatile setting should affect
serialization. Making something volatile should only affect code
generation and has (should have) no direct implication that the feature
is derived or transient. I would expect that only the transient setting
should affect serialization. (Of course what I expect and what actually
is might not match.)


</pre>
</blockquote>
<pre wrap=""><!---->
&lt;snip&gt;
</pre>
</blockquote>
<br>
</body>
</html>

--------------010104050407010800020408--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Teneo] Persisting an Ecore Model [message #606780 is a reply to message #84741] Thu, 24 May 2007 14:40 Go to previous message
Martin Taal is currently offline Martin TaalFriend
Messages: 5468
Registered: July 2009
Senior Member
Hi,
Thanks Ian for letting us know.
The reason that Teneo uses it is that for jpox it is required to have an actual member in the
generated code. For hibernate this is less of an issue.
Ian, can you enter a bugzilla for this on Teneo
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT

Then I can let Teneo handle this better.

gr. Martin

Ed Merks wrote:
> Christian,
>
> The core runtime doesn't use isVolatile for anything. Arguably it
> should never have been a property in Ecore itself but rather should
> have been a generator property, i.e., it should have been a property on
> the GenFeature since it has no meaningful impact outside of generated code.
>
>
> Christian W. Damus wrote:
>> Hi, Ed,
>>
>> It used to be, that in an EStructuralFeature
>>
>> isVolatile && isTransient && !isChangeable
>>
>> indicated that a feature was derived (before the isDerived attribute was
>> introduced). Does that interpretation still hold in some places? How does
>> EMF deal with models created before isDerived came into being?
>>
>> Cheers,
>>
>> Christian
>>
>>
>> Ed Merks wrote:
>>
>>
>>> Ian,
>>>
>>> I wouldn't expect that the volatile setting should affect
>>> serialization. Making something volatile should only affect code
>>> generation and has (should have) no direct implication that the feature
>>> is derived or transient. I would expect that only the transient setting
>>> should affect serialization. (Of course what I expect and what actually
>>> is might not match.)
>>>
>>>
>>>
>>
>> <snip>
>>
>


--

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] Persisting an Ecore Model [message #606781 is a reply to message #84756] Thu, 24 May 2007 16:32 Go to previous message
Ian Bull is currently offline Ian BullFriend
Messages: 145
Registered: July 2009
Senior Member
Done:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188973

Thanks guys!
p.s. EMF / EMFT / Eclipse Modeling ROCKS!!!

Martin Taal wrote:
> Hi,
> Thanks Ian for letting us know.
> The reason that Teneo uses it is that for jpox it is required to have an
> actual member in the generated code. For hibernate this is less of an
> issue.
> Ian, can you enter a bugzilla for this on Teneo
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMFT
>
> Then I can let Teneo handle this better.
>
> gr. Martin
>
> Ed Merks wrote:
>> Christian,
>>
>> The core runtime doesn't use isVolatile for anything. Arguably it
>> should never have been a property in Ecore itself but rather should
>> have been a generator property, i.e., it should have been a property
>> on the GenFeature since it has no meaningful impact outside of
>> generated code.
>>
>>
>> Christian W. Damus wrote:
>>> Hi, Ed,
>>>
>>> It used to be, that in an EStructuralFeature
>>>
>>> isVolatile && isTransient && !isChangeable
>>>
>>> indicated that a feature was derived (before the isDerived attribute was
>>> introduced). Does that interpretation still hold in some places?
>>> How does
>>> EMF deal with models created before isDerived came into being?
>>>
>>> Cheers,
>>>
>>> Christian
>>>
>>>
>>> Ed Merks wrote:
>>>
>>>
>>>> Ian,
>>>>
>>>> I wouldn't expect that the volatile setting should affect
>>>> serialization. Making something volatile should only affect code
>>>> generation and has (should have) no direct implication that the feature
>>>> is derived or transient. I would expect that only the transient
>>>> setting
>>>> should affect serialization. (Of course what I expect and what
>>>> actually
>>>> is might not match.)
>>>>
>>>>
>>>>
>>>
>>> <snip>
>>>
>>
>
>
Previous Topic:[Teneo] Persisting an Ecore Model
Next Topic:[Teneo] Resolving lists
Goto Forum:
  


Current Time: Sun Feb 28 04:40:30 GMT 2021

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

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

Back to the top