You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Ziv Yankowitz <zi...@traiana.com> on 2005/03/22 13:14:41 UTC

urgent 3 level Inheritance problem

Hi All,

we have class A, Class B extends A and has a "super" reference-descriptor to A, Class C extends B and has a "super" reference-descriptor to B
when we retrieve an instance of C and update a field which is part of A class it doesn't work.

I debugged OJB source and found out this happens because the AnonymousPersistentFieldForInheritance stores the references objects (like B and A) in a Map leading that The currentImage and the beforeImage in ObjectEnvlope are the same.

is it possible to configure OJB not to store the references in a Map.

Thanks Ziv.




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: urgent 3 level Inheritance problem

Posted by Martin Kalén <mk...@apache.org>.
Ziv Yankowitz wrote:
> is it possible to configure OJB not to store the references in a Map.

Without going into your detailed question; I think you should be able to 
work around any problems by implementing equals and hashCode in your 
beans such that <instance of A>.equals(<instance of B>) or <instance of 
A>.eqauls(<instance of C>) etc never returns true.

Regards,
  Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org