Hi Thomas,

I'm using the version 1.0.rc7 from binary distribution (db-ojb-1.0.rc7.tgz), but I found the trouble, I passed to you only the part of class that I think that is with the error, but there as a mapping to a collection of other class, but this class isn't mapped, then this invalidades the persistent state of Person and throws the exception, then I removed the mapping for this collection and works here too.
Sorry this is my fault, now I will put all XDoclet in all classes before testing xdoclet-ojb generation of repository, in next time I will take more care.


Thanks

Thomas Dudziak wrote:

Cl�vis Wichoski wrote:

Hi,

I'm attempting to map a reference to same class using XDoclet, but I'm geting the Exception on build:

xdoclet.XDocletException: The class Person referenced by myCreator in class Person is not persistent

Maybe this is a Bug or there is another way to map references to same class?

follow are the way that I'm mapping:

/**
* @ojb.class table="PERSON"
* @ojb.field name="myCreatorOid"
*            column="MY_CREATOR"
*            jdbc-type="VARCHAR"
*/
public class Person {
   /**
   * @ojb.field column="OID"
   *            length="8"
   *            primarykey="true"
   **/
   public String oid;

   /**
   * @ojb.reference foreignkey="myCreatorOid"
   */
   Person myCreator;

}



I just added a testcase that mimics your scenario, and it passes without problems. Which version of the xdoclet ojb module do you use ? Please try with the CVS version, you can get the three jars - xdoclet, xjavadoc, xdoclet-ojb-module, from the CVS view on the OJB website.


Tom


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





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



Reply via email to