Return-Path: Delivered-To: apmail-incubator-cayenne-commits-archive@locus.apache.org Received: (qmail 74886 invoked from network); 12 Oct 2006 02:58:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 02:58:10 -0000 Received: (qmail 18384 invoked by uid 500); 12 Oct 2006 02:58:09 -0000 Delivered-To: apmail-incubator-cayenne-commits-archive@incubator.apache.org Received: (qmail 18371 invoked by uid 500); 12 Oct 2006 02:58:09 -0000 Mailing-List: contact cayenne-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cayenne-dev@incubator.apache.org Delivered-To: mailing list cayenne-commits@incubator.apache.org Received: (qmail 18340 invoked by uid 99); 12 Oct 2006 02:58:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 19:58:08 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2006 19:58:01 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id F14B31A981A; Wed, 11 Oct 2006 19:57:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r463117 - /incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java Date: Thu, 12 Oct 2006 02:57:35 -0000 To: cayenne-commits@incubator.apache.org From: aadamchik@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061012025735.F14B31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: aadamchik Date: Wed Oct 11 19:57:35 2006 New Revision: 463117 URL: http://svn.apache.org/viewvc?view=rev&rev=463117 Log: CAY-682 Generic Cayenne POJO enhancer Now passes a simple property update test Modified: incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java Modified: incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java?view=diff&rev=463117&r1=463116&r2=463117 ============================================================================== --- incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java (original) +++ incubator/cayenne/main/trunk/integration-test/pojo/src/test/java/org/apache/cayenne/itest/pojo/SimpleObjectTest.java Wed Oct 11 19:57:35 2006 @@ -46,4 +46,19 @@ assertEquals("Y", o.getName()); assertEquals(5, DataObjectUtils.intPKForObject((Persistent) o)); } + + public void testUpdate() throws Exception { + getDbHelper().deleteAll("entity1"); + getDbHelper().insert("entity1", new String[] { "id", "name" }, + new Object[] { 5, "Y" }); + + SelectQuery q = new SelectQuery(Entity1.class); + List results = context.performQuery(q); + assertEquals(1, results.size()); + + Entity1 o = (Entity1) results.get(0); + o.setName(o.getName() + "-U"); + context.commitChanges(); + assertEquals("Y-U", getDbHelper().getObject("entity1", "name")); + } }