Banu Ramamurthy - 2004-12-15

I generate the .jaxor files from a MySQL schema executed the jaxor target. In the following situation, illegal code is generated.
In my schema, one of the tables has two foreign key references to another table. For example, Department tables has two foreign key references to the Employee table with column names, head and administrator respectively. In this scenario, illegal code is generated - since duplicate methods are created in the XXXBase.java, XXXEntityRow.java and XXXEntiy.java.xxx file.
To get to this point, I had to use thw workaround suggested by mutlide in this thread.
http://sourceforge.net/forum/forum.php?thread_id=1129411&forum_id=201218

The methods are generated in duplicate.

XXXBase.java:

  public companyname.work.jaxor.YYYEntity getYYYEntity() {
        return ( companyname.work.jaxor.YYYEntity ) _row.YYYEntity.getValue();
   }

   public void setYYYEntity(companyname.work.jaxor.YYYEntity var) {
        _row.YYYEntity.setValue(var);
   }
-------------------------------------------------------------------------------------------------------

XXXEntity.java:

   public companyname.work.jaxor.YYYEntity getYYYEntity();
   public void setYYYEntity(msk.sadl.jaxor.YYYEntity var);

   public companyname.work.jaxor.YYYEntity getYYYEntity();
   public void setYYYEntity(companyname.work.jaxor.YYYEntity var);
-------------------------------------------------------------------------------------------------------

XXXEntityRow.java:

  public final net.sourceforge.jaxor.util.ForeignFieldLazyLoader YYYEntity =
    new net.sourceforge.jaxor.util.ForeignFieldLazyLoader(new ReferenceResolver(companyname.work.jaxor.YYYFinderBase.class,this,true,null,null));
  public final net.sourceforge.jaxor.util.ForeignFieldLazyLoader YYYEntity =
    new net.sourceforge.jaxor.util.ForeignFieldLazyLoader(new ReferenceResolver(companyname.work.jaxor.YYYFinderBase.class,this,true,null,null));
    addForeignField( YYYEntity );
    YYYEntity.getResolver().add(new companyname.work.jaxor.ConnectionMetaRow().getYYY1Id(),new msk.sadl.jaxor.YYYMetaRow().getId());

    addForeignField( YYYEntity );
    YYYEntity.getResolver().add(new companyname.work.jaxor.ConnectionMetaRow().getYYY2Id(),new companyname.work.jaxor.YYYMetaRow().getId());
---------------------------------------