Return-Path: Delivered-To: apmail-incubator-cayenne-user-archive@locus.apache.org Received: (qmail 52511 invoked from network); 22 Apr 2006 11:57:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Apr 2006 11:57:35 -0000 Received: (qmail 56138 invoked by uid 500); 22 Apr 2006 11:57:34 -0000 Delivered-To: apmail-incubator-cayenne-user-archive@incubator.apache.org Received: (qmail 56124 invoked by uid 500); 22 Apr 2006 11:57:34 -0000 Mailing-List: contact cayenne-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-user@incubator.apache.org Delivered-To: mailing list cayenne-user@incubator.apache.org Received: (qmail 56115 invoked by uid 99); 22 Apr 2006 11:57:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Apr 2006 04:57:34 -0700 X-ASF-Spam-Status: No, hits=1.6 required=10.0 tests=MAILTO_TO_SPAM_ADDR,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mkienenb@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nproxy.gmail.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Apr 2006 04:57:33 -0700 Received: by nproxy.gmail.com with SMTP id p48so516633nfa for ; Sat, 22 Apr 2006 04:57:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aOFTwezsa6IaAxNYiXHIiNlKxUbfmZLX2LOK6hXkGa9MkHAjJweo8IpndbPUgwePW5dtWCiP6pXYizsJ/Sg8V0NFfqMLd0VYxUHIx1KAzo8lK+Vy6S+Ig6VmHr4D8IGQsKbBBLkHv3tdeR1xkcnAHxdEzdpqIUOOlRYJJDkYdA4= Received: by 10.48.14.6 with SMTP id 6mr618691nfn; Sat, 22 Apr 2006 04:57:12 -0700 (PDT) Received: by 10.48.216.7 with HTTP; Sat, 22 Apr 2006 04:57:12 -0700 (PDT) Message-ID: <8f985b960604220457i7d71feb7qd554736598e9d0ea@mail.gmail.com> Date: Sat, 22 Apr 2006 07:57:12 -0400 From: "Mike Kienenberger" To: cayenne-user@incubator.apache.org Subject: Re: does Cayenne creates objects by hisself? In-Reply-To: <002801c665fe$8991f360$14b2a8c0@PC> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <570FE5C299B4CC4587C95EF5680619C1867DD6@FNHH-SVMEXDB003.Freenet-AG.de> <57E6EEB0-BA45-46CD-9341-2FDDF51D1156@objectstyle.org> <006f01c66480$b7323430$14b2a8c0@PC> <45B7A54B-6F3D-4918-BAB5-2C8F711D3194@pfrog.com> <76A40C7C-14CD-447B-ACCA-48771D909181@objectstyle.org> <000f01c665f0$5c751050$14b2a8c0@PC> <002801c665fe$8991f360$14b2a8c0@PC> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N No, you'd have to associate the visitor with a particular user somehow. By default the relationship will be null. visitor.setUser(user) or user.addToVisitorList(visitor) On 4/22/06, WONDER wrote: > Hi, > > I have the folloging situation. > > Entity "User" has relation toMany "Visitor" its name is visitors. > > Usually if I "Fetch" the object Visitor from DB and then call > > visitor.user() > > Cayenne fetches the object User from the DB automatically. > > > Now, creating a Visitor object. > > Visitor visitor =3D new Visitor(); > > and calling > > visitor.user() > > will Cayenne here creates the object User automatically, or I have to do = it by myself? > > Thanks. >