DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page EMF EAttribute not persisting
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Sep 2008
Thumbs down EMF EAttribute not persisting - 09-15-2008, 12:59 AM

I have an ecore whose structure is given below:

Class A contains Class B
Class B contains Class C/Class D

Class D is a subclass of Class C.

The Ecore is:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore">
<ecore:EPackage name="model" nsURI="http:///com/gm/tools/frames/stsmodel.ecore"
nsPrefix="com.gm.tools.frames.model">
<eClassifiers xsi:type="ecore:EClass" name="A">
<eStructuralFeatures xsi:type="ecore:EReference" name="requirementPages" upperBound="-1"
eType="#/0/RequirementTab" containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="B">
<eStructuralFeatures xsi:type="ecore:EReference" name="clauses" upperBound="-1"
eType="#/0/Template" containment="true" resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="C">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="templateId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="templateLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral="Clause"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="selected" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="indexPosition" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="D" eSuperTypes="#/0/Template">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="CLAUSE_TYPE" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
changeable="false" defaultValueLiteral="ImportESC" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="file" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"
defaultValueLiteral="" derived="true"/>
</eClassifiers>
</ecore:EPackage>
<ecore:EPackage name="DefaultName8882100"/>
</xmi:XMI>


My model has an instance of Class B containing references of Type Class C whose instances are of Class D.

Problem statement:
When i try to persist this model, the EAttributes of Class D are not getting persisted whereas the EAttributes of its super class D do get persisted.

Would appreciate any clues / solutions.
Thanks.
Reply With Quote
  (#2 (permalink)) Old
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Sep 2008
Default issue was with EJavaObject - 09-15-2008, 09:17 AM

Well the problem had nothing to do with class hierarchy.
The EAttribute was set to EJavaObject which is not serializable.
Reply With Quote
Reply

Tags
eattribute, ecore, emf, persistence

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
smart caret setting not persisting ovbugme Eclipse 0 03-31-2008 03:05 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com