U can do something like this... u can specify the access mode on the execute
method of OQLQuery
OQLQuery objectQuery = db.getOQLQuery("select p from test.ProductImpl p");
QueryResults results = objectQuery.execute(Database.ReadOnly);
Hope I have answered ur question..
-Anil
-----Original Message-----
From: Mark Ericson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 7:35 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] Read-only query?
I noticed there is significant overhead at commit time to determine which
objects have changed to write those changes to the database. If however the
objects are read-only this check is bypassed. I also noticed it is
possible to load a single object from the database and specify to load it
read-only.
I'm very interested in the ability to perform an OQL query but specify in
advance that I want read-only results. I don't see a way to do that in
Castor other than declaring my classes as read-only in the mapping file
(which I don't want to do).
Any advise?
Thanks,
Mark
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev