thank you very much andrus. I studied the cache,but forgot altogether.
Anyway , for a beginner like me, it won't always come to mind. Thanks for
reminding about cache. Similarly, i revisited transaction. i can control
transaction on my own. When I unchecked container managed transaction in
modeler, cayenne takes care of transactions on it's own.
I wont start my transaction explicitly. There is no need for me to control
the transaction, as the code flow need to execute 2 or more updates either
completely or not at all. So, when it will typically roll back(on what
terms/conditions/situations/exceptions it will roll back)?
On Thu, Jul 23, 2009 at 12:54 PM, Andrus Adamchik <andru..bjectstyle.org>wrote:
>
> 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
>
--Yours Sincerely, Devatha Sridhar
This archive was generated by hypermail 2.0.0 : Thu Jul 23 2009 - 05:06:44 EDT