Runtime relationships & client

From: Kevin Menard (kmenar..ervprise.com)
Date: Wed Nov 07 2007 - 23:56:27 EST

  • Next message: Ari Maniatis (JIRA): "[JIRA] Created: (CAY-916) Ordering should be able to ignore paths with null elements"

    Andrus,

    Not too long ago you removed the need for explicitly specifying reverse
    relationships in the map. It looks like these have been replaced with
    runtime relationships that are discovered internally to Cayenne.

    How does that work with the client classes, which explicitly declare every
    field? My guess is that with CDO this isn't an issue because it's just an
    entry in a map.

    As part of the ROP work, I'm running into problems with newObject. This
    strikes me as a problem that's likely been solved before. I've included a
    bit of a stack trace below, but I don't think it will help much.

    Thanks,
    Kevin

    -- 
    

    Caused by: org.apache.cayenne.CayenneRuntimeException: [v.${project.version} ${project.build.date} ${project.build.time}] Error instantiating object. at org.apache.cayenne.access.DataContext.newObject(DataContext.java:762) at org.apache.cayenne.access.DataContext.newObject(DataContext.java:740) at com.servprise.www.pages.account.AccountCreationPage.pageBeginRender(AccountC reationPage.java:44) at org.apache.tapestry.AbstractPage.firePageBeginRender(AbstractPage.java:409) at org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:244) at org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:397) ... 44 more Caused by: org.apache.cayenne.CayenneRuntimeException: [v.${project.version} ${project.build.date} ${project.build.time}] No field 'runtimeRelationship0' is defined in class: com.servprise.www.models.Address at org.apache.cayenne.reflect.FieldAccessor.prepareField(FieldAccessor.java:110 ) at org.apache.cayenne.reflect.FieldAccessor.<init>(FieldAccessor.java:50) at org.apache.cayenne.reflect.PersistentDescriptorFactory.createAccessor(Persis tentDescriptorFactory.java:221) at org.apache.cayenne.reflect.valueholder.ValueHolderDescriptorFactory.createTo ManyListProperty(ValueHolderDescriptorFactory.java:69) at org.apache.cayenne.reflect.PersistentDescriptorFactory.getDescriptor(Persist entDescriptorFactory.java:100) at org.apache.cayenne.reflect.PersistentDescriptorFactory.getDescriptor(Persist entDescriptorFactory.java:51) at org.apache.cayenne.reflect.ClassDescriptorMap.createDescriptor(ClassDescript orMap.java:128) at org.apache.cayenne.reflect.LazyClassDescriptorDecorator.checkDescriptorIniti alized(LazyClassDescriptorDecorator.java:49) at org.apache.cayenne.reflect.LazyClassDescriptorDecorator.createObject(LazyCla ssDescriptorDecorator.java:63) at org.apache.cayenne.access.DataContext.newObject(DataContext.java:759) ... 49 more Caused by: java.lang.NoSuchFieldException: runtimeRelationship0 at java.lang.Class.getDeclaredField(Class.java:1854) at org.apache.cayenne.reflect.FieldAccessor.lookupFieldInHierarchy(FieldAccesso r.java:154) at org.apache.cayenne.reflect.FieldAccessor.lookupFieldInHierarchy(FieldAccesso r.java:163) at org.apache.cayenne.reflect.FieldAccessor.lookupFieldInHierarchy(FieldAccesso r.java:163) at org.apache.cayenne.reflect.FieldAccessor.prepareField(FieldAccessor.java:101 )



    This archive was generated by hypermail 2.0.0 : Thu Nov 08 2007 - 00:17:51 EST