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 Grim Shieldsson <gr...@yahoo.com> on 2003/07/26 03:04:54 UTC

Okay figured out one probelm with 1-N

Cleared the cache to late.  So changed that, now it's not persisting to
the DB.  However, the parentOID and the oid fields of the N object are
in fact being updated!  With valid oid's.  They are just not being
stuffed into the database.

tx.begin();
PersistenceBroker pb = tx.getBroker();
pb.removeFromCache( updatedMember);
		
Member staleMember = findByOID( updatedMember.getOid());
			
cat.debug( "staleMember   " + staleMember);
			
// 4. acquire write lock on new object
tx.lock(staleMember, Transaction.WRITE);
BeanUtils.copyProperties(staleMember, updatedMember);
cat.debug( "after modification " + staleMember);
			
// 5. commit transaction
tx.commit();

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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