Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 61910 invoked from network); 31 Dec 2009 16:20:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Dec 2009 16:20:38 -0000 Received: (qmail 81787 invoked by uid 500); 31 Dec 2009 16:20:38 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 81738 invoked by uid 500); 31 Dec 2009 16:20:38 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 81728 invoked by uid 99); 31 Dec 2009 16:20:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 16:20:38 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msabo@buk.cvut.cz designates 147.32.104.6 as permitted sender) Received: from [147.32.104.6] (HELO sekvoj.buk.cvut.cz) (147.32.104.6) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Dec 2009 16:20:30 +0000 Received: from localhost (localhost [127.0.0.1]) by sekvoj.buk.cvut.cz (Postfix) with ESMTP id BBF319B665 for ; Thu, 31 Dec 2009 17:20:08 +0100 (CET) Received: from sekvoj.buk.cvut.cz ([127.0.0.1]) by localhost (mail.buk.cvut.cz [127.0.0.1]) (amavisd-maia, port 10024) with LMTP id 17693-10 for ; Thu, 31 Dec 2009 17:19:59 +0100 (CET) Received: from [192.168.1.21] (85-135-229-216.adsl.slovanet.sk [85.135.229.216]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sekvoj.buk.cvut.cz (Postfix) with ESMTPSA id 568D49B660 for ; Thu, 31 Dec 2009 17:19:59 +0100 (CET) Message-ID: <4B3CCF2D.6050407@buk.cvut.cz> Date: Thu, 31 Dec 2009 17:19:57 +0100 From: =?UTF-8?B?TWFyZWsgxaBhYm8=?= Organization: Club SU CVUT Buben User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: user@cayenne.apache.org Subject: Re: Registering existing dataObjects References: <4B3CB5B7.50002@buk.cvut.cz> <5adb61290912310703k5a175270o7aa736868590cfef@mail.gmail.com> <4B3CC458.6090504@buk.cvut.cz> <5adb61290912310802mc967982i4d6805d247b618c4@mail.gmail.com> In-Reply-To: <5adb61290912310802mc967982i4d6805d247b618c4@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard Michael Gentry wrote: > On Thu, Dec 31, 2009 at 10:33 AM, Marek Šabo wrote: > >> Michael Gentry wrote: >> >>> On Thu, Dec 31, 2009 at 9:31 AM, Marek Šabo 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