Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 27785 invoked from network); 3 Dec 2009 14:50:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 14:50:19 -0000 Received: (qmail 31248 invoked by uid 500); 3 Dec 2009 14:50:18 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 31178 invoked by uid 500); 3 Dec 2009 14:50:18 -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 31168 invoked by uid 99); 3 Dec 2009 14:50:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 14:50:18 +0000 X-ASF-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [91.121.30.210] (HELO 27.mail-out.ovh.net) (91.121.30.210) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 03 Dec 2009 14:50:16 +0000 Received: (qmail 18009 invoked by uid 503); 3 Dec 2009 15:26:38 -0000 Received: from b9.ovh.net (HELO mail620.ha.ovh.net) (213.186.33.59) by 27.mail-out.ovh.net with SMTP; 3 Dec 2009 15:26:38 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 3 Dec 2009 14:50:34 -0000 Received: from mol92-1-82-67-218-223.fbx.proxad.net (HELO ?172.16.1.10?) (j-b.briaud%novlog.com@82.67.218.223) by ns0.ovh.net with SMTP; 3 Dec 2009 14:50:33 -0000 From: Jean-Baptiste BRIAUD -- Novlog Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: detach question Date: Thu, 3 Dec 2009 15:49:52 +0100 Message-Id: <29FD8F5F-E7DE-479C-A9E6-2735B8858BFF@novlog.com> To: users@openjpa.apache.org Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) X-Ovh-Tracer-Id: 15004023635094003750 X-Ovh-Remote: 82.67.218.223 (mol92-1-82-67-218-223.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N Hi the list, Am i right on the following pseudo code ? // Note the detach. // getFullById come back with an instance of MyObject from = the primary key final MyObject ooo =3D detach(getFullById(cc.... < Here I modify (a lot) ooo but don't wan't the modif to be = persist> try { cc.beginTransaction(); cc.merge(ooo); cc.commitTransaction(); } catch (...) { cc.rollbackTransaction(); } Thanks !=