I have a basic question about object caching. Using the sample code in Tutorial 1, I
understand how to do things like QueryByIdentity to pull objects from a database (for
example, provide a product ID to retrieve a Product object). I also understand (and
have seen via the spy) that objects retrieved this way are cached in RAM after the
initial lookup.
However, it seems when I use QueryByCriteria, I get the results, not from the cache,
but from the database. Based on what I have read on the OJB website, I'm thinking that
this happens specifically because the criteria I'm using is not one of the db primary
keys (e.g. Using Tutorial 1 as an example, if I query using the NAME column, OJB goes
to the database to retrieve the value, but does not cache the outcome so any
subsequent calls with the same NAME also hit the database, not the cache)
If my thoughts are correct (let me know if they are not!), is there a way to cache an
object retrieved from the database with a QueryByCriteria call, when the critieria
consists of a field or fields that are not one of the primary keys?
Dave
---
Dave Hodson
MessageCast, inc.
Email: [EMAIL PROTECTED]
www.messagecast.net