Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » problem with object in mulitple lists
problem with object in mulitple lists [message #606990] Thu, 14 June 2007 11:17
Eclipse UserFriend
I have a case where TypeC extends TypeB, which extends TypeA. TypeC has an
EList<TypeB> getter method. If I have two instances of TypeC, and add the
same instance of TypeB to the ELists in both instances of TypeC, it doesn't
work. The first TypeC's EList has the position where the TypeB object
should have been set to null.

I created a test using the names listed above, created two TypeB objects
named TestNameB1 and TestNameB2, and then added both to an instance of
TypeC, and only TestNameB1 to a second instance of TypeC. Here is the
output when I spit them out to the console. The "members" is a println of
the EList.

typeC:com.syntellect.test.model.impl.TypeCImpl@178655 (name: TestNameC1)
members:[[null, com.syntellect.test.model.impl.TypeBImpl@1be4663 (name:
TestNameB2) (someData: Some test data2)]]
typeC:com.syntellect.test.model.impl.TypeCImpl@746ad0 (name: TestNameC2)
members:[[com.syntellect.test.model.impl.TypeBImpl@d8a1a0 (name:
TestNameB1) (someData: Some test data1)]]

Note the null in the first position of the first TypeC's list. If don't add
TestNameB1 to the second TypeC, the first position is filled fine, as it
should be.

Thanks,
Paul
Previous Topic:[Teneo / JPOX] Generate EMF JDO/JPOX OR Mapping
Next Topic:problem with object in mulitple lists
Goto Forum:
  


Current Time: Fri Jul 04 08:24:04 EDT 2025

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

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

Back to the top