cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1578349 - /cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java
Date Mon, 17 Mar 2014 13:02:54 GMT
Author: aadamchik
Date: Mon Mar 17 13:02:53 2014
New Revision: 1578349

URL: http://svn.apache.org/r1578349
Log:
cleanup, no change

Modified:
    cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java

Modified: cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java?rev=1578349&r1=1578348&r2=1578349&view=diff
==============================================================================
--- cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java
(original)
+++ cayenne/main/trunk/cayenne-server/src/test/java/org/apache/cayenne/access/DataContextDisjointByIdPrefetch_ExtrasTest.java
Mon Mar 17 13:02:53 2014
@@ -87,7 +87,7 @@ public class DataContextDisjointByIdPref
         // http://technet.microsoft.com/en-us/library/ms188059.aspx
 
         Collection<Object> invalidate = new ArrayList<Object>();
-        ObjectContext context = runtime.getContext();
+        ObjectContext context = runtime.newContext();
 
         Bag b1 = context.newObject(Bag.class);
         invalidate.add(b1);
@@ -329,11 +329,10 @@ public class DataContextDisjointByIdPref
     public void testJointPrefetchInChild() throws Exception {
         createBagWithTwoBoxesAndPlentyOfBallsDataSet();
 
-        SelectQuery query = new SelectQuery(Bag.class);
-        query.addPrefetch(Bag.BOXES_PROPERTY).setSemantics(PrefetchTreeNode.DISJOINT_BY_ID_PREFETCH_SEMANTICS);
-        query.addPrefetch(Bag.BOXES_PROPERTY + "." + Box.BALLS_PROPERTY).setSemantics(
-                PrefetchTreeNode.JOINT_PREFETCH_SEMANTICS);
-        final List<Bag> result = context.performQuery(query);
+        SelectQuery<Bag> query = new SelectQuery<Bag>(Bag.class);
+        query.addPrefetch(Bag.BOXES.disjointById());
+        query.addPrefetch(Bag.BOXES.dot(Box.BALLS).joint());
+        final List<Bag> result = context.select(query);
 
         queryInterceptor.runWithQueriesBlocked(new UnitTestClosure() {
 



Mime
View raw message