Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Michael Gentry
It is my experience that Cayenne handles lazy relationships (faults) very well -- just keep your objects/data context/etc around. As soon as a fault is triggered, Cayenne will get a (pooled) connection to the database, do what it needs, then return the connection. When I was subscribed to the Tap

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Andrus Adamchik
It should work... Just to be sure I tried it on MySQL 5. It works: 1. One-to-many OUTER JOIN: mysql> select t0.artist_id, t1.painting_title FROM artist t0 left join painting t1 on t0.artist_id = t1.artist_id order by t1.PAINTING_TITLE; +---++ | artist_id | painting_

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Marek Wawrzyczny
Thanks Marcin and Andrus, Andrus, are you sure that the problem Marcin is describing can be solved? I thought that something like: SELECT t1.id, t1.a, t1.t2_fk, t2.id, t2.x FROM table1 AS t1 LEFT JOIN table2 AS t2 ON t2.id = t1.t2_fk ORDER BY t2.x would never return results from t1 that do not

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Andrus Adamchik
3.0 EJBQLQuery should be able to handle that. Andrus On Feb 28, 2008, at 2:44 PM, Marcin Skladaniec wrote: Hi Short comment on the cayenne sorted queries, they work great but be aware of a limitation: (the query examples assume one to many relation Artist-Painting) SelectQuery query = ne

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Marcin Skladaniec
Hi Short comment on the cayenne sorted queries, they work great but be aware of a limitation: (the query examples assume one to many relation Artist-Painting) SelectQuery query = new SelectQuery(Painting.class); query.addOrdering(Painting.ARTIST_PROPERTY+"."+Artist.LAST_NAME,true); will not r

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Marek Wawrzyczny
Thanks Kevin, Your response was quite encouraging. Most of the pages are very simple but there is one or two which enforces quite coplex workflow. It's a perfect candidate for a child context. Just out of curiosity, how do people manage contexts in a typical CRUD application containing several

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-28 Thread Malcolm Edgar
Another thing to consider is whether you want to serialize the object graph in the session. Another approach is to write it to the database, and have a status column in the parent object. When the final page "submit" is performed, the status column is flipped to invoke the business process. Using

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-27 Thread Michael Gentry
When I used Cayenne with a Tapestry application, I stored a DataContext off in the session (so it was persistent across request/response loops) and I could use it to handle objects I needed to track from page-to-page (or even to the same page, but in a different request/response loop). This is wha

Re: Cayenne and Spring (a Hibernate inspired question)

2008-02-27 Thread Robert Zeigler
MAIL PROTECTED] Sent: Tuesday, February 26, 2008 7:14 AM To: user@cayenne.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/Hi

RE: Cayenne and Spring (a Hibernate inspired question)

2008-02-27 Thread Kevin Menard
--- > From: Marek Wawrzyczny [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 26, 2008 7:14 AM > To: user@cayenne.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 > Sw

Cayenne and Spring (a Hibernate inspired question)

2008-02-26 Thread Marek Wawrzyczny
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.