Hi Tal, OJB's store method does not differentiate between INSERT and UPDATE. Thus OJB must decide internally which method is to be used.
If you know in advance if you have to use an INSERT (or an UPDATE) you cant give OJB a hint. just use PB.store(instace, ObjectModification) The objectModification tells the broker if insert or update is needed. cheers, Thomas > [Standalone OJB 0.9.7 with default cache, Oracle 8i] > > Hi, > > Using the singlevm.PersistenceBroker, I've created a (very) > simple test. I > query for an object, modify and then store it. When looking > at the SQL log I > notice that two SELECT statements are being called (one when > querying and > one when storing). > From taking a short look at the code I understand that the > 2nd SELECT is > done in store() (by calling materializeObject) to determine > between INSERT > and UPDATE statements. Isn't it the cache's property? As I > understand it, > this means that a redundant SELECT is being done for each object. > > I'd appreciate any help. > > Thanks, > Tal > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>