cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: 3.2 support for vertical inheritance and query flushing?
Date Tue, 01 Apr 2014 09:54:32 GMT
Sorry for delayed reply. VI is supported, although there were a few nasty bugs. In 3.2 we’ve
removed a big source of related instability - “runtime” ObjRelationships. I hope this
fixed most of it, but can’t guarantee that it fixes everything. 

I don’t think we’ve ever used the term “flushing”, so Google won’t show it. But
transaction control is definitely there. If I understand this correctly (and translating to
Cayenne terms), you need a way to have an open transaction (container managed, or managed
in your code) and do multiple commits within this transaction, with a single atomic rollback.
This is doable in Cayenne of course. Here is manual example using 3.2 (there’s more verbose
API that does it in the older versions) :

serverRuntime.performInTransaction(new TransactionalOperation<SomeResult>() {
       public SomeResult perform() {

          // this will be a flush
          context1.commitChanges();

          // this will be another flush
          context2.commitChanges();

          return someResult;
       }
   }
);

Andrus


On Mar 21, 2014, at 6:47 PM, Mike Kienenberger <mkienenb@gmail.com> wrote:
> My primary client is once again considering switching from JPA to Cayenne.
> 
> The last time this was brought up back in 2010, the lack of full
> vertical inheritance support was an issue, and there was also the
> question of handling JPA flush calls.
> 
> When I looked at the 3.0 docs, it seems like we now support vertical
> inheritance fully, although I haven't tried it.
> 
> I don't enable flushing, but one of our programmers here flushes every
> query, so if we were going to convert over to Cayenne, this would have
> to be necessary.  I'm not entirely certain how that would work in
> Cayenne, although I thought someone said something about using
> external transactions to make this happen.   A google search on
> cayenne flushing didn't turn up anything, and I know that the idea of
> automatically flushing sql isn't a good fit with Cayenne.
> 


Mime
View raw message