Hi Tom,

 the only generator we have in good shape to generate Tuscany SDO
classes is the XSD to Java generator.  I think it would be a
significant new feature to properly support what you are trying to do.
 You are correct in your understanding that you must arrange for a
specialised factory to be in place to create your types, so that they
are instances of Type rather than of EClass. Tuscany SDO itself has to
do this in order to ensure that the SDOFactory is used to create SDO
objects.

Regards, Kelvin.

On 25/06/07, Thomas Kuhn <[EMAIL PROTECTED]> wrote:
Hi,

I'm getting a ClassCastException (see below) when I try to do
myDataObj.getChangeSummary().beginLogging();

I am use EMF to create the objects. I changed the .genmodel file to generate
SDO objects (I changed the genmodel first to create SDO 1.0 objects.
Subsequently, I modified the .genmodel file to generate code that uses the
Tuscany classes). The generated interfaces extend DataObject and their
implementations correctly extend DataObjectImpl. I think the problem lies in
the generated Package file, where getMyDataObj() returns an EClass.  If it
would be of any help, I can provide the .genmodel file.

Is it possible at all to generate SDO  from an EMF model?

Thanks in advance,

Tom

java.lang.ClassCastException: org.eclipse.emf.ecore.impl.EClassImpl
 at
org.apache.tuscany.sdo.impl.DataObjectImpl.getType(DataObjectImpl.java:192)
 at
org.apache.tuscany.sdo.util.DataObjectUtil.getChangeSummary(DataObjectUtil.j
ava:688)
 at
org.apache.tuscany.sdo.impl.DataObjectImpl.getChangeSummary(DataObjectImpl.j
ava:1314)
....

Environment: EMF 2.2.0, SDO 2.1.0 incubating beta1







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to