On Thu, Dec 31, 2009 at 10:33 AM, Marek Šabo <[email protected]> wrote: > Michael Gentry wrote: >> >> On Thu, Dec 31, 2009 at 9:31 AM, Marek Šabo <[email protected]> wrote: >> >>> >>> Hi, >>> >>> I would like to have a question, does cayenne have some mechanism for >>> registering already existing objects (e.g. beans/dataobjects extended >>> from >>> _auto classes) without the need of creating new object and then passing >>> all >>> parameters from bean to that dataobject (e.g >>> datacontext.save(DataObject)). >>> I saw a method objectsfromdatarows so I was thinking about that >>> similarity. >>> >> >> datacontext.save(DataObject) seems a lot like Hibernate and Cayenne >> doesn't work the same way as Hibernate. I'm not quite sure what you >> are trying to accomplish there. >> > > Right, Hibernate uses session.save, but when going through datacontext api > it occured to me that it can come handy, it' not that big deal.
If you just want to persist a single object off, without taking into account any other changes in your original datacontext, just create a brand new datacontext for that one object and commit it. >>> And has anybody tried that password rotation mechanism? It isn't working >>> for >>> me (can't establish database connection), is there something that needs >>> to >>> be done besides setting it in datanode xml? >>> >> >> I assume you are talking about the rot13/47 methods? They've worked >> for me in the past. Which version of Cayenne are you using? >> >> mrg >> > > I located the problem, sure for 99%. I used v3b1 modeller to reingeneer db > and in mave ni have 2.0.4 dependency. I need to get 3b1 > cayenne-server/client. Anyway what is biggest difference between cayenne > server and client, i suppose client could do for simple database handling. The Cayenne Server module is the most common one you'll use. It is what you would use in a web application or standalone Java job (such as a batch job) or even a Swing UI that connects directly to the database. The Client module is for the Remote Object Persistence feature, which I doubt you are using. It is documented separately here: http://cayenne.apache.org/doc/remote-object-persistence-guide.html mrg
