cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lepine" <>
Subject DataObjectUtils.objectForPK
Date Wed, 28 Nov 2007 20:55:23 GMT
I noticed that the convenience methods in the DataObjectUtils class only
execute a query if the object is not already cached. Is there a way to force
the methods to issue a query to the database? I've included an excerpt of
the javadocs for 2.0 below.

public static DataObject
                                     java.lang.Class dataObjectClass,
                                     java.lang.Object pk)

 Returns an object matching an Object primary key. If the object is mapped
to use a compound PK, CayenneRuntimeException is thrown.

If this object is already cached in the ObjectStore, it is returned without
a query. Otherwise a query is built and executed against the database.
Thanks for the help.

- Mike

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message