Re: How to migrate from Hibernate to Cayenne?

2008-02-21 Thread Chris Murphy
I concur with paragraph two - it seems that web frameworks have a way to go (excepting GWT et al) before just having getters and setters for controls, so you can drag and drop the visual part of an application together at design time, and then separately be concerned about programming the even

Re: How to migrate from Hibernate to Cayenne?

2008-02-21 Thread Michael Gentry
I pretty much concur with Malcom's thoughts. You aren't alone. :-) 2008/2/21 Malcolm Edgar <[EMAIL PROTECTED]>: > > > Well personally I think the whole POJO thing has been completely over > done. Sure EJB entity beans were not much fun, but saying everything > should now extend java.util.Obj

Re: How to migrate from Hibernate to Cayenne?

2008-02-21 Thread Malcolm Edgar
Well personally I think the whole POJO thing has been completely over done. Sure EJB entity beans were not much fun, but saying everything should now extend java.util.Object is stupid. With persistence API entities need a bunch of support, you can use Cayenne model where you subclass intelligent

Re: how to get update/insert SQL without committing to db

2008-02-21 Thread tobias . schoessler
Andrus thank you for this suggestion. I notice that I am actually not interested in the update/insert SQL on commit to solve my problem. but existing DataObjects themselves and their interconnection. backup restore the whole database would be a solution, yes but I would like to only transfer par

RE: Queries based on relationship size

2008-02-21 Thread Kevin Menard
Yeah. It shouldn't be too bad. What I have now is a generic list entities page in Tapestry. I start off with a SelectQuery which gets the class name using a template method (boy, type erasure sure is fun), and then subclasses can sort the values or filter out as need be. It'd actually be really

Re: Queries based on relationship size

2008-02-21 Thread Andrus Adamchik
I hope the difference between the two will not be that noticeable (I'd say logically they are the same, only the assembly API is different) once we implement a master generics-friendly object query that was discussed on the dev list some time back... But this won't happen overnight of cours

RE: Queries based on relationship size

2008-02-21 Thread Kevin Menard
Thanks. I'll have to give that a go over the weekend. Unfortunately, my API structure is centered around SelectQuery and a visitor for adding expressions and orderings. Changing the root query type will require a few more changes than I was hoping for. At least it'll give me an excuse to finall

Re: how to get update/insert SQL without committing to db

2008-02-21 Thread Andrus Adamchik
Tracing all changes can be accomplished by other means, e.g. via recording all GraphDiffs before commit (GraphDiffs are the internal format Cayenne uses to store object changes, that are later transformed to SQL). However I'd recommend investigating a DB-level backup solution, as a much m

Re: how to get update/insert SQL without committing to db

2008-02-21 Thread Tobias SCHOESSLER
Hi Andrus, I did in fact forget about that. I was looking for an easy way to recreate parts of the object network to transfer between stages of our application. E.g. create SQL for a data set to insert it in the development db for testing.   Tobias Andrus Adamchik <[EMAIL PROTECTED]> Thur

Migrate from Hibernate3 to Cayenne :) ?

2008-02-21 Thread Demetrios Kyriakis
Since the "migration" is the motto these days :) , I would like to know if there's a trick to quickly migrate a Hibernate3 application to Cayenne(can be JPA too). I'm talking about this application: http://subetha.tigris.org/ Subetha looks cool, just that H3 + JBoss makes it an overkill for most

Re: How to migrate from Hibernate to Cayenne?

2008-02-21 Thread Borut Bolčina
Hello, since when can modeler generate POJOs? AFAIK those generated classes extend CayenneDataObject which in turn implements three interfaces, therefore making it a complex object model. Did I miss something lately? -Borut 2008/2/20, Scott Anderson <[EMAIL PROTECTED]>: > > Tom, > > Take a look

Re: Queries based on relationship size

2008-02-21 Thread Andrus Adamchik
EJBQL query with outer joins should help: 1. select c from Customer c JOIN c.orderHistory (inner join filters customers with Orders, so this is like a regular SelectQuery) 2. select c from Customer c LEFT JOIN c.orderHistory d WHERE d is null (outer join combined with the WHERE clause

Re: how to get update/insert SQL without committing to db

2008-02-21 Thread Andrus Adamchik
Hi Tobias, Could you elaborate a bit on how are you going to use this SQL? SQL generated by Cayenne is in a PreparedStatement format, so it will not be usable for say manual execution from a SQL client. Andrus On Feb 21, 2008, at 2:55 PM, Tobias SCHOESSLER wrote: Hi, is there a way to

how to get update/insert SQL without committing to db

2008-02-21 Thread Tobias SCHOESSLER
Hi, is there a way to get the update/insert SQL statements ( e.g. as a String ) that cayenne would execute with a commit,  without actually committing to the db? thank you Tobias

Create SQL-DDL scripts

2008-02-21 Thread Frank Schwarz
Hi, is there a way to let Cayenne's cdbgen ant task create a file with the SQL DDL instead of manipulating the database directly? Cheers, Frank -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger