From: Andy J. (JIRA) <web...@jp...> - 2007-09-11 08:21:48
|
[ http://www.jpox.org/servlet/jira/browse/ENHANCER-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_14382 ] Andy Jefferson commented on ENHANCER-97: ---------------------------------------- Where is the testcase for this ? All issues have to have a testcase. Please explain how it is different to ENHANCER-90 > Invalid case for generating composite PK property during the enhancement > ------------------------------------------------------------------------ > > Key: ENHANCER-97 > URL: http://www.jpox.org/servlet/jira/browse/ENHANCER-97 > Project: Enhancer > Issue Type: Bug > Components: JDO Enhancer : BCEL > Affects Versions: 1.2.0-beta-3 > Reporter: Eddie Man > > If I had a class which is mapped as the following > <class name="History" table="History"> > <field name="date" column="date" primary-key="true"/> > <property name="OWN_Account" column="AccountID" primary key="true"/> > </class> > When I running the code, it will throw the following exception: > Exception in thread "main" java.lang.NoSuchMethodError: ebank.History.jdoGetOWN_Account()Lebank/Account; > at ebank.History.jdoCopyKeyFieldsToObjectId(History.java) > at org.jpox.api.JDOAdapter.getNewApplicationIdentityObjectId(JDOAdapter.java:715) > at org.jpox.store.StoreManager.newObjectID(StoreManager.java:839) > at org.jpox.state.JDOStateManagerImpl.setIdentity(JDOStateManagerImpl.java:769) > at org.jpox.state.JDOStateManagerImpl.initialiseForPersistentNew(JDOStateManagerImpl.java:463) > at org.jpox.state.StateManagerFactory.newStateManagerForPersistentNew(StateManagerFactory.java:151) > at org.jpox.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1087) > at org.jpox.sco.SCOUtils.validateObjectForWriting(SCOUtils.java:1243) > at org.jpox.store.rdbms.scostore.ElementContainerStore.validateElementForWriting(ElementContainerStore.java:379) > at org.jpox.store.rdbms.scostore.FKSetStore.add(FKSetStore.java:531) > at org.jpox.store.rdbms.scostore.FKSetStore.addAll(FKSetStore.java:629) > at org.jpox.store.mapping.CollectionMapping.postInsert(CollectionMapping.java:244) > at org.jpox.store.rdbms.request.InsertRequest.execute(InsertRequest.java:439) > at org.jpox.store.rdbms.table.ClassTable.insert(ClassTable.java:2608) > I had using the decompiler to see the ebank.History, and I found that the method is generated as > jdoGetoWN_Account() > but the in jdoCopyKeyFieldsToObjectId() method, which is called jdoGetOWN_Account() -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.jpox.org/servlet/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |