Armin Waibel wrote:

Hi again,

Guillaume Nodet wrote:

Maybe using the Identity object's 'equals' method should solve the problem.


hmm, Identity should be ok, but it's much more costly than using object identity in this case.


I don't think the point here is on business objects equality. The point is
to know if the object ojb is storing or deleting has already been processed
or not for a given object graph. This can only be the case if the primary
keys of the objects are the same (wether they are stored in the objects or
anonymous).


There could be cases where two objects have the same primary keys, but are
not the same object (in the sense of '=='). In theses case, and you are
right about that, this would lead to problems.


What are the problems? If we delete the same object twice or more (same PK, but different instances), nothing should happend.
When we store different instances with same PK, first time an insert will happend, all further instances cause an update.
Do I overlook a fault?


Well, the latter sounds like the order of storage matters if there are any differences.... But maybe this is a user problem not OJB's problem... The becomes, can ordering issues arise within OJB that the user can't control?






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



Reply via email to