Record caching

gary adams <[email protected]> Sun, 7 Jun 2009 09:35:05 -0400
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
I have been using SimpleORM for the last two months and its a great tool.  I have a question about record caching

 

If one has static information in the database that he wants to cache in an application, like configuration information, what is the proper methodology of doing this with simpleORM?  The app will need access to this information throughout its life.

 

I have done it likes this.

 
LIST<x> listX= session.queryNoFlush(queryDEF);
session.commitAndDetachDataSet();
 
Is this correct?  I am concerned that the commit being done in the class that requires the cache will affect other items in the database that should not be committed yet.
 
Along the same lines,  what is the proper way to attaching records to a dataset from a rawquery? I have used
session.getDataSet().attach(record), but I am concerned because it is deprecated.

 

thanks
GA

 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009