We are using the equals methods generated by castor, and are finding a few problems One such problem is in the generated class below. A screenshot from XML Spy showing the schema structure is also attached. The problem is that this equals implementation will return true whenever the optional class attribute '_travel' is null, even if the argument object's attribute is non-null. Is this a known problem ? and is there a fix kind thanks, Mark Ralph Chief Technology Officer ------------------------------ BSIS Digital Consulting ------------------------------ p| +61 8 9389 9466 -x106 | f| +61 8 9389 9366 | m| 0418 919 617 | e| [EMAIL PROTECTED] | w| http://www.bsis.com.au/ | c| ABN 55 082 541 437 | ------------------------------ ---------------------------------------------------------------------------- ------------------ SNIPPETT STARTS ---------------------------------------------------------------------------- ------------------ public class TGuestMainRevise extends TPersonMainRevise implements java.io.Serializable { private TGuestTravelInfo _travel; public TGuestMainRevise() { super(); } //-- com.mic.tds.api.business.objects.apitypes.TGuestMainRevise() /** * Note: hashCode() has not been overriden * @param obj **/ public boolean equals(java.lang.Object obj) { if ( this == obj ) return true; if (super.equals(obj)==false) return false; if (obj instanceof TGuestMainRevise) { TGuestMainRevise temp = (TGuestMainRevise)obj; if ( (this._travel != null) &&!(this._travel.equals(temp._travel))) return false; return true; } return false; } //-- boolean equals(java.lang.Object) /** **/ public TGuestTravelInfo getTravel() { return this._travel; } //-- TGuestTravelInfo getTravel() /** * * @param travel **/ public void setTravel(TGuestTravelInfo travel) { this._travel = travel; } //-- void setTravel(TGuestTravelInfo) }
<<attachment: winmail.dat>>
