On Jul 23, 2009, at 7:40 AM, sridhar devatha wrote:
> Please answer about not providing methods for getting the existing
> registered objects from data context?
You can lookup an object by ObjectId (PK, but you can define a PK more
broadly to include any set of unique columns if you care). Or run a
query against those same columns with a cache strategy of LOCAL_CACHE,
which will do what you asked for - fetch only if an object is not
already in the DataContext.
> Please answer how objectForQuery() works?That is, whether it looks
> in the
> data context before hitting the database
> .
See above. It depends on the query cache settings.
> Please answer about declarative transactions using a good example.
Cayenne is not a J2EE container or an EJB engine. It just works in
whatever environment you have. It's up to you to setup declarative
transactions as appropriate in your situation. All you need to do in
Cayenne is check "Container Managed Transactions" checkbox for the
DataDomain to make it behave nicely in a managed environment.
Andrus
This archive was generated by hypermail 2.0.0 : Thu Jul 23 2009 - 03:25:21 EDT