Hi Marek,
My Hibernate experience is limited to a single project that did not use
Spring, so it's hard for me to draw a fair comparison. My take from
passively watching on discussion lists (particularly the Tapestry one)
is that Spring makes Hibernate usable in a way that Cayenne is out of
the box. It seems you know this already, though.
In a Web app I have here, we an account creation operation split up over
three screens and it involves several different entities. For this, I
simply used a peer context per page and coalesce everything at the end.
This is a little bit older code and I would likely use a child context
for it now. The reason I did it this way is that while conceptually a
single operation, completing any of the phases is a complete
transaction. If you want to enforce start to finish behavior, you could
use a single context shared via session. Just watch yourself because
it's a lot harder to enforce a workflow through a browser than it is
through Swing.
As for sorting across multiple relationships, I guess I would have to
understand a little more as to what you want to do. Simplest thing is
to write your own Comparator, but you may want to look at mapping a
query, and barring that, use SQLTemplate to achieve what you need in the
DB.
I hope that helps.
-- Kevin Menard Servprise International, Inc. Remote reboot & power control for your network www.servprise.com +1 508.892.3823 x308> -----Original Message----- > From: Marek Wawrzyczny [mailto:marek_wawrzyczn..nternode.on.net] > Sent: Tuesday, February 26, 2008 7:14 AM > To: use..ayenne.apache.org > Subject: Cayenne and Spring (a Hibernate inspired question) > > Hi, > > It has been a while since I last used Cayenne and that was within a > Swing ROP > context. > > More recently I have been involved in writing a Spring MVC/Hibernate > application. The experience has only made me fonder for Cayenne and now > it > appears that the team I'm in may consider ORM alternatives. > > My application is relatively simple CRUD application with the exception > of one > set of two screens, where all data entry culminates in a parent/child > interface (using Spring's AbstractWizardFormController ). > > The object graph can become somewhat complex, combining objects from > about 10 > different entities. The pages ideally would require a long-running > session, > or rather a ObjectContext spanning several requests. > > I'm curious as to how well does Cayenne handle these types of > interfaces in > web applications. > > The other problem we're currently having is sorting across multiple > relationships. > > I'm curious as to other people's experiences in this area. I would love > to be > able to convince the team to move to Cayenne if the framework fits the > bill. > > > Kind regards, > > Marek Wawrzyczny
This archive was generated by hypermail 2.0.0 : Wed Feb 27 2008 - 08:52:41 EST