Hi Marek, Are you talking about saving or fetching? On saving, optimistic locking can help catch stale data issues. On fetching, I always prefer to go back to the DB and get fresh data (not use the cache).
mrg On Wed, Nov 30, 2011 at 3:53 PM, Marek Šabo <[email protected]> wrote: > Hi, > > my app that uses cayenne got few rows changed externally in mysql database. > I observed that app didn't behave according to these changes and after > restarting it worked as expected (with those changed rows). Could this be > due to cayenne caching mechanism. Or is it probably bug on my side? If > former, is it possible to set time expiration on cache, or invoke expiration > manually? > > Thanks, > > Regards, > > Marek > > On 11/30/2011 06:47 PM, Durchholz, Joachim wrote: >> >> On http://cayenne.apache.org/doc/modeling-inheritance.html , I see this >> statement: >> "As of this writing Cayenne does not support horizontal inheritance. It >> may in the future." >> >> Well, guess what, the first instance where I absolutely need inheritance >> does require horizontal modeling. Two legacy tables happen to have a very >> similar column structure and server very similar purposes, and since the >> processing is complicated and accesses many fields of each record, having a >> common superclass wired up would really simplify a lot of code. >> >> So the question is: Is there any realistic hope that this will be done >> soon? >> Would outside help speed up things? >> Limited help, unfortunately. I'll have to justify any time I sink into >> this :-( >> >> The other approach might be faking a vertical/joined scenario using views. >> However, I'd like to avoid that because I know that views tend to come >> with their own cans of worms (updateability and lack of useful metadata). >> >> Regards, >> Jo
