Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 21113 invoked from network); 4 Dec 2009 15:43:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Dec 2009 15:43:12 -0000 Received: (qmail 28074 invoked by uid 500); 4 Dec 2009 15:43:12 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 28044 invoked by uid 500); 4 Dec 2009 15:43:12 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 28034 invoked by uid 99); 4 Dec 2009 15:43:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 15:43:12 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of curtisr7@gmail.com designates 209.85.211.178 as permitted sender) Received: from [209.85.211.178] (HELO mail-yw0-f178.google.com) (209.85.211.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Dec 2009 15:43:02 +0000 Received: by ywh8 with SMTP id 8so2451620ywh.3 for ; Fri, 04 Dec 2009 07:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=s5O7GWFQ1mH9WsbRM0KyyxxO97Fz0QBJEM1h4ask+sM=; b=ojb22oSO32akRw5RAmeDcrB86/HAXAp/PXtNmHdfiiHCOrRmki6qzMv3B0k1Rf6KKQ 6JX9tmGCtt1hFdDIzEhMzg7tQlb0ZDO0x83xGe2hViMddZCarmPfZJdcYKkqiHNbAUhz Hyoi80ChDHzU0YyeG58SO7uwl5t1N9rllhmUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=aLF/dwI6J9P85CwJlNCalMhvN5cwJUqQniALqIHlQ4/dY1+W2gPrDibvc2z2fe3tIO kjNvFNqzYTM9SzZsY46ECJns7bTgS7XRrfLYlGU9hx8zlObDZrjzZJ4W0h3BxZd2G7Hp K/RyRBoW8Y/PwrdeLjLS30MHnr53SDKtlIGsQ= MIME-Version: 1.0 Received: by 10.150.7.6 with SMTP id 6mr5647910ybg.261.1259941360274; Fri, 04 Dec 2009 07:42:40 -0800 (PST) In-Reply-To: <1259876283487-4109048.post@n2.nabble.com> References: <1259876283487-4109048.post@n2.nabble.com> Date: Fri, 4 Dec 2009 09:42:40 -0600 Message-ID: Subject: Re: Setter not working for detached object From: Rick Curtis To: users@openjpa.apache.org Content-Type: multipart/alternative; boundary=000e0cd3512a378eac0479e8f502 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd3512a378eac0479e8f502 Content-Type: text/plain; charset=ISO-8859-1 Tao - Can you post a simple testcase demonstrating the problem? -- Thanks, Rick On Thu, Dec 3, 2009 at 3:38 PM, Javatao wrote: > > Hi, Experts, > > I am having an issue with detached object in OpenJPA. > > Setter method of relationship field does not work. > Setter method of primitive field works fine. > > Here is an example > ======================================= > ... > Foo foo = entityManager.find(Foo.class, 1); > Bar foo = entityManager.find(Bar.class, 2); > ... > entityManager.close(); > ... > > > foo.setName("newNameFoo"); > bar.setName("newNameBar"); > foo.setBar(bar); > System.out.println(foo.getName()); > System.out.println(bar.getName()); > System.out.println(foo.getBar()); > ===================== > > Here is the output: > > newNameFoo > newNameBar > null > > > This is so wierd! > > Any idea? > > Many thanks in advance! > > Tao > > > -- > View this message in context: > http://n2.nabble.com/Setter-not-working-for-detached-object-tp4109048p4109048.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > --000e0cd3512a378eac0479e8f502--