Can someone explain the WHY behind this code fragment?  It's from
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.store(Object).  I
thought there was a state kept, to determine if it's an insert or new.
Having to load the object from the database just to write it back out seems
very wasteful.


            boolean doInsert = false;
            // lookup cache or db to see whether object needs insert or
update
            if (dbAccess.materializeObject(cld, oid) == null)
            {
                doInsert = true;
                // now store it:
            }



This message contains information from Equifax Inc. which may be
confidential and privileged.  If you are not an intended recipient, please
refrain from any disclosure, copying, distribution or use of this
information and note that such actions are prohibited.  If you have
received this transmission in error, please notify by e-mail
[EMAIL PROTECTED]



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

Reply via email to