Hello Keith,
I am currently using the CVS version : ie am using the jar files of the castor_daily_snapshot.tar.
And am also using the castor 0.9.3.jar.
And am using the Castor XML for data binding using only the marshalling and the unmarshalling framework.
This is in continuation of my earlier mail regarding the reference =�true� attribute of the bind-xml tag.
I have implemented the same, the requirement being the the back reference from the many side to the one side results in an infinite loop when marshalling is done.
I mean , we have a I:m relationship between auftrag and auftragposition.
My mapping file has a field which is refering to the auftrag object ie. The get method being getMyAuftrag().
The above usage results in an infinite loop inspite of using the ID and IDREF methodology as reightly suggested by you.
The implementation of the above methods in their respective classes would be worth seeing because the same when implemented in a sample scenario with two classes referring to eachother does not result in an infinte loop.
The same is as follows:
Class Auftrag�.
public void addAuftragsPosition(com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftragsposition newAuftragsPosition)
throws BODBException, BOReferenceNotUpdatedException, BOUpdateConflictException {
// ARB1
auftragsPositionPxy.addToCollection(this, "auftragsPosition", newAuftragsPosition,dbSelector);
}
public com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftragsposition[] getAuftragsPosition() throws BODBException {
// ARB4
return (com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftragsposition[])auftragsPositionPxy.get(this, "auftragsPosition",dbSelector);
}
Class Auftragposition�
public void setMyAuftrag(com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag newMyAuftrag)
throws BODBException, BOReferenceNotUpdatedException {
myAuftragPxy.setReference(this, "myAuftrag", newMyAuftrag,dbSelector);
markDirty();
}
public com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag getMyAuftrag() throws BODBException {
return (com.dekra.automobil.auftragswesen.pbo.vbsf.PBOVBSFAuftrag)myAuftragPxy.getReference(this, "myAuftrag",dbSelector);
}
on including the above mentioned methods as fields in the m,apping file, the marshalling results in an infinte loop.
The same scenario in the sample does not result into one though.that is the reason I have included the above �
Kindly suggest me the soution for the same,since we may have auftrag object as well as auftragposition object to be marshalled and hence the handling of the above relationship is important�and the tool must understand the marshlling of the getMy auftrag as an reference to the auftrag object and just marshall the id field in this case being the auftrag id�.and go ahead marshalling the object network.
Your prompt response would be highly appreciated.
Regds,
Chetan
Get your FREE download of MSN Explorer at http://explorer.msn.com
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
