You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2007/12/23 22:10:57 UTC
svn commit: r606618 -
/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java
Author: aadamchik
Date: Sun Dec 23 13:10:57 2007
New Revision: 606618
URL: http://svn.apache.org/viewvc?rev=606618&view=rev
Log:
CAY-948 Implement flattened attributes in Cayenne
(update works)
Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java
Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java?rev=606618&r1=606617&r2=606618&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextFlattenedAttributesTest.java Sun Dec 23 13:10:57 2007
@@ -206,7 +206,8 @@
}
public void testDelete() throws Exception {
- // adding a bit of random overlapping dta to db...
+ // throw in a bit of random overlapping data, to make sure FK/PK correspondence is
+ // not purely coincidental
Artist a = context.newObject(Artist.class);
a.setArtistName("AX");
context.commitChanges();
@@ -236,5 +237,24 @@
context,
new EJBQLQuery("select count(a) from Gallery a"));
assertEquals(0, galleryCount.intValue());
+ }
+
+ public void testUpdate() {
+ CompoundPainting o1 = context.newObject(CompoundPainting.class);
+ o1.setArtistName("A1");
+ o1.setEstimatedPrice(new BigDecimal(1d));
+ o1.setGalleryName("G1");
+ o1.setPaintingTitle("P1");
+ o1.setTextReview("T1");
+
+ context.commitChanges();
+
+ o1.setArtistName("X1");
+ o1.setEstimatedPrice(new BigDecimal(2d));
+ o1.setGalleryName("X1");
+ o1.setPaintingTitle("X1");
+ o1.setTextReview("X1");
+
+ context.commitChanges();
}
}