| [CDO] Problem with single Ecore, multiple packages [message #617962] |
Wed, 30 April 2008 11:30 |
Eclipse User |
|
|
|
Hi Eike,
I've come across a problem when dealing with an Ecore file containing
multiple packages.
Ecore file:
Package1:
ClassA [has an attribute of type ClassD]
ClassB
Package2:
ClassC
ClassD
In my client, I register both packages (A & B) with my session's package
registry. I then create an object of type ClassA, but I don't set
(leave it as null) its attribute of type ClassD.
When CDO reaches the server side at commit time, I only see Package1
being transfered over and since ClassA references Package2 through an
attribute of ClassD, I get an exception:
Unable to resolve classref: CDOClassRef(Package2, ...)
at CDOClassProxy.getCdoClass(CDOClassProxy.java:71)
at CDOFeatureImpl.getReferenceType(CDOFeatureImpl.java:243)
at
CDOFeatureReferenceTypePropertyHandler.get(CDOFeatureReferen ceTypePropertyHandler.java:63)
If I take the same code and create an object of type ClassC (or any
object from Package2) and add this object to my resource, Package2 will
get transfered over and my test will work. So in order to see your
package on the server side, you need to:
1. Register it
2. Create at least one object from that package
Problem is that object of type ClassA references Package2. So when
deciding which package need to be transfered, CDO will have to do a deep
scan of the object instead of only using its containingPackage (this is
how I assume CDO works, correct me if I'm wrong).
Any thoughts?
Eric
|
|
|
Powered by
FUDForum. Page generated in 0.03565 seconds