Oh yeah, to get an ObjectId, use
new ObjectId("EntityName", "pkAttributeName", pk)
for "primaryKey" below. Look at the constructors for ObjectId if you
have compound keys/etc. Like I said, I didn't test it. :-)
/dev/mrg
-----Original Message-----
From: Gentry, Michael (Contractor) [mailto:michael_gentr..anniemae.com]
Sent: Monday, March 06, 2006 10:18 AM
To: cayenne-use..bjectstyle.org
Subject: RE: avoid caching on fetching by primary key
I haven't tested this, but try:
object = DataObjectUtils.objectForQuery
(dataContext,
new ObjectIdQuery(primaryKey));
/dev/mrg
-----Original Message-----
From: Mahmut Izci [mailto:mahmut.izc..reenet.de]
Sent: Monday, March 06, 2006 7:00 AM
To: cayenne-use..bjectstyle.org
Subject: avoid caching on fetching by primary key
Hi,
I'm using DataObjectUtils.objectForPK to find entries. But this method
is caching the query results.
Alternatively I tried to use select queries, but cayenne did not
generate getters and setters for primary keys.
How can i fetch by primary keys and avoid caching?
Thanks
Mahmut
This archive was generated by hypermail 2.0.0 : Mon Mar 06 2006 - 11:46:18 EST