Re: [JIRA] Created: (CAY-925) Support Entity/Table scope caching

2007-11-28 Thread Andrus Adamchik
Yes, this is correct. Of course use LOCAL_CACHE only when you think it is appropriate (i.e. the data doesn't change within a single user session lifespan). Also there's new pluggable 3.0 API that would allow you to control expiration of the query cache. This should be considered advanced AP

Re: [JIRA] Created: (CAY-925) Support Entity/Table scope caching

2007-11-28 Thread Malcolm Edgar
Hi Andrus, Thanks for the advice. To do this I presume I need to have Level 2 (local VM) caching enabled, and then set caching policy as appropriate for the query: // For most of the queries QueryMetadata.LOCAL_CACHE // For cached lookup data QueryMetadata.SHARED_CACHE regards Malcolm Edgar O

Re: DataObjectUtils.objectForPK

2007-11-28 Thread Michael Lepine
Okay, thank you. On Nov 28, 2007 3:06 PM, Aristedes Maniatis <[EMAIL PROTECTED]> wrote: > > On 29/11/2007, at 7:55 AM, Michael Lepine wrote: > > > I noticed that the convenience methods in the DataObjectUtils class > > only > > execute a query if the object is not already cached. Is there a way

Re: DataObjectUtils.objectForPK

2007-11-28 Thread Aristedes Maniatis
On 29/11/2007, at 7:55 AM, Michael Lepine wrote: I noticed that the convenience methods in the DataObjectUtils class only execute a query if the object is not already cached. Is there a way to force the methods to issue a query to the database? After you get the object you can set its per

DataObjectUtils.objectForPK

2007-11-28 Thread Michael Lepine
I noticed that the convenience methods in the DataObjectUtils class only execute a query if the object is not already cached. Is there a way to force the methods to issue a query to the database? I've included an excerpt of the javadocs for 2.0 below. public static DataObject

Re: Cayenneand Thread-Bound DataContext

2007-11-28 Thread Michael Gentry
Hi Oilid, If I understand you correctly (and there is a chance I do not), you are doing these steps in a web application: 1) Session is created 2) Enter data into a form with a value of 5000.0 for contribution_tariff_amount 3) Create new Cayenne object (added to DataContext) with 5000.0 for contr

Cayenneand Thread-Bound DataContext

2007-11-28 Thread Oilid Adsi
Hello, I tried to use a Thread-Bound DataContext with Cayenne 2.0.3 (http://cwiki.apache.org/CAYDOC/obtaining-datacontext.html): [code] public DataContext getDataContext() { try { logger.debug("trying to get threaded-data-context for thread " + Thread.currentThread());