Return-Path: Delivered-To: apmail-openjpa-users-archive@locus.apache.org Received: (qmail 86971 invoked from network); 19 Nov 2007 00:12:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 00:12:08 -0000 Received: (qmail 2567 invoked by uid 500); 19 Nov 2007 00:11:55 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 2546 invoked by uid 500); 19 Nov 2007 00:11:55 -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 2537 invoked by uid 99); 19 Nov 2007 00:11:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2007 16:11:55 -0800 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 marc.siegel.17@gmail.com designates 209.85.132.245 as permitted sender) Received: from [209.85.132.245] (HELO an-out-0708.google.com) (209.85.132.245) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 00:11:45 +0000 Received: by an-out-0708.google.com with SMTP id c24so825866ana for ; Sun, 18 Nov 2007 16:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ACLdrbml5XvRUfpc7iRvv+avgQxHpWvMWTc0UMMINGg=; b=IDPX54tXHMvC/pcCEX8y0mu5XFOptpM7uaEfSF/sIKNLSygssORo8JgvBouHddvViW8no97zoBC7Mvi1hZSgAVlYaaLW635+dfutHiponoPTJhMds5T0UmT1dDtednfaxv6bxtesC+5yFVPIaR6Dw8SElXCUd5m7HG/M5Qc5cA0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PIpfTMFSzIbN2JWy1JgsvBFE4rtg4KWCfv6ed4w86ZjqUAAMaKhjt0ha89PGqiZLZ10ohppDhPAny8+0KzKYoUG0s4qCQkZ5b3D0kh/bnMBbCZ9CBr5HGhDivBGtXkJ7XCp5WdAmv6OxO7zEvbXuxS9dtfRMcUURgaIipu3klws= Received: by 10.70.39.9 with SMTP id m9mr458372wxm.1195431098420; Sun, 18 Nov 2007 16:11:38 -0800 (PST) Received: by 10.70.26.19 with HTTP; Sun, 18 Nov 2007 16:11:38 -0800 (PST) Message-ID: <2f58dd5d0711181611w61cabb8cu8fbb835aacb48913@mail.gmail.com> Date: Sun, 18 Nov 2007 19:11:38 -0500 From: "Marc Siegel" To: users@openjpa.apache.org Subject: Re: Merge not working as SaveOrUpdate In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org > Simple fail example: > > RRole role = new RRole(99999l, "dasf", "df"); > rroleService.add(role); > role = new RRole(99999l, "dasffsdf", "df"); > rroleService.update(role); > > Where update: > RRole mergedEntity = em.merge(entity); > em.persist(mergedEntity); I don't think you need to call persist(), just merge() Right? -Marc