Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 89071 invoked from network); 5 Jun 2008 14:07:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2008 14:07:02 -0000 Received: (qmail 39142 invoked by uid 500); 5 Jun 2008 14:07:02 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 39129 invoked by uid 500); 5 Jun 2008 14:07:02 -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 39118 invoked by uid 99); 5 Jun 2008 14:07:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 07:07:02 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ari@ish.com.au designates 59.167.240.32 as permitted sender) Received: from [59.167.240.32] (HELO fish.ish.com.au) (59.167.240.32) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 14:06:11 +0000 Received: from delish.ish.com.au ([203.29.62.201] helo=ish.com.au) by fish.ish.com.au with esmtps (SSLv3:DES-CBC3-SHA:168) (Exim 4.43) id 1K4G9P-0004Ei-BF for user@cayenne.apache.org; Fri, 06 Jun 2008 00:09:11 +1000 Received: from [10.29.62.13] ([10.29.62.13] verified) by ish.com.au (CommuniGate Pro SMTP 5.2.3) with ESMTP id 3525526 for user@cayenne.apache.org; Fri, 06 Jun 2008 00:06:26 +1000 Message-Id: <3064A728-3ADF-441D-A5FD-C7F3B6A7CDA5@ish.com.au> From: Aristedes Maniatis To: user@cayenne.apache.org In-Reply-To: <7c2bc3da0806050648t45dd8e74v99a6f520635a7691@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: Relationships of unsaved object Date: Fri, 6 Jun 2008 00:06:21 +1000 References: <7c2bc3da0806050534g5662da65r5c0a7abaa128fa97@mail.gmail.com> <9F5CBD59-A30D-444E-BBB2-85E6ACA7E5F3@ish.com.au> <7c2bc3da0806050648t45dd8e74v99a6f520635a7691@mail.gmail.com> X-Mailer: Apple Mail (2.924) X-Virus-Checked: Checked by ClamAV on apache.org On 05/06/2008, at 11:48 PM, Micha=C5=82 Morzywo=C5=82ek wrote: > As far as i understand Hibernate was created to fit DAO model - and =20= > it works > perfectly. > Cayenne seems to have very different architecture in this matter. =20 > With the > need of registering the new objects in Cayenne (at the start) it's =20 > hard to > create perfectly "sterile" DAO layer. > It is possible but its much slower then using newObject() method and =20= > just > "mixing it all". Not sure what you mean by sterile, but Cayenne has a different history =20= and different strengths to Hibernate. Registering new objects from the =20= point of instantiation actually does have some advantages and I think =20= it is a pattern you'll quickly grow to like. But yes, it is different =20= and is not the JPA/Hibernate way. It means that objects are always =20 tracked by Cayenne through their entire life, and they are always =20 attached to a context. If you really want, there is a POJO enhancer available in Cayenne 3 as =20= part of the JPA compliance work. Documentation is still a bit thin at =20= this time. Ari --------------------------> ish http://www.ish.com.au Level 1, 30 Wilson Street Newtown 2042 Australia phone +61 2 9550 5001 fax +61 2 9550 4001 GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A