cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marek Šabo <ms...@buk.cvut.cz>
Subject Re: Registering existing dataObjects
Date Thu, 31 Dec 2009 16:19:57 GMT
Michael Gentry wrote:
> On Thu, Dec 31, 2009 at 10:33 AM, Marek Šabo <msabo@buk.cvut.cz> wrote:
>   
>> Michael Gentry wrote:
>>     
>>> On Thu, Dec 31, 2009 at 9:31 AM, Marek Šabo <msabo@buk.cvut.cz> 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.
>
>
>   
I'm not sure if I follow you on this one: you mean to instantiate the 
DataContext class? What would it help to clear one?
I have no problem with retrieving current datacontext of web-app.
Now, datacontext creates and registers new object for me which I should 
fill with data and commit changes.
I was talking about registering an existing object already filled with 
data and then commiting the changes.
>>>> 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
>
>   
Yep, I already found it and thanks.

-- 
Marek Šabo
Chief Server Manager
Club SU CVUT Buben
Bubenečská Kolej
Terronská 28, Prague 16000
XMPP: zeratul021@gmail.com


Mime
View raw message