Author: aadamchik
Date: Thu Dec 21 01:53:33 2006
New Revision: 489303
URL: http://svn.apache.org/viewvc?view=rev&rev=489303
Log:
CAY-724 - aplying 3.0 fix to 1.2 branch
Modified:
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/DataDomainQueryAction.java
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.3.txt
Modified:
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/DataDomainQueryAction.java
URL:
http://svn.apache.org/viewvc/incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/DataDomainQueryAction.java?view=diff&rev=489303&r1=489302&r2=489303
==============================================================================
---
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/DataDomainQueryAction.java
(original)
+++
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-java/src/cayenne/java/org/objectstyle/cayenne/access/DataDomainQueryAction.java
Thu Dec 21 01:53:33 2006
@@ -108,6 +108,7 @@
Map prefetchResultsByPath;
Map queriesByNode;
Map queriesByExecutedQueries;
+ boolean noObjectConversion;
/*
* A constructor for the "new" way of performing a query via 'execute' with
@@ -147,8 +148,9 @@
}
}
- // turn results to objects
- interceptObjectConversion();
+ if (!noObjectConversion) {
+ interceptObjectConversion();
+ }
return response;
}
@@ -227,25 +229,21 @@
DataRow targetRow = cache.getCachedSnapshot(targetId);
- DataRow resultRow;
-
if (targetRow != null) {
- resultRow = targetRow;
- }
- // if no inheritance involved, we can return a valid partial row
made from
- // the target Id alone...
- else if (domain.getEntityResolver().lookupInheritanceTree(
- (ObjEntity) relationship.getTargetEntity()) == null) {
-
- resultRow = new DataRow(targetId.getIdSnapshot());
+ this.response = new
GenericResponse(Collections.singletonList(targetRow));
+ return DONE;
}
- else {
- // can't guess the right target...
- return !DONE;
+ // a hack to prevent passing partial snapshots to ObjectResolver
... See
+ // CAY-724 for details.
+ else if (context != null
+ && domain.getEntityResolver().lookupInheritanceTree(
+ (ObjEntity) relationship.getTargetEntity()) ==
null) {
+
+ this.noObjectConversion = true;
+ Object object = context.localObject(targetId, null);
+ this.response = new
GenericResponse(Collections.singletonList(object));
+ return DONE;
}
-
- this.response = new
GenericResponse(Collections.singletonList(resultRow));
- return DONE;
}
return !DONE;
Modified:
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.3.txt
URL:
http://svn.apache.org/viewvc/incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.3.txt?view=diff&rev=489303&r1=489302&r2=489303
==============================================================================
---
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.3.txt
(original)
+++
incubator/cayenne/main/branches/STABLE-1.2/cayenne/cayenne-other/release-notes/RELEASE-NOTES-1.2.3.txt
Thu Dec 21 01:53:33 2006
@@ -15,3 +15,4 @@
CAY-653 overriding setPersistentState() in unreliable in three tier
environment with CayenneContext
CAY-690 Exception in the Modeler when changing schema on derived entities
CAY-712 Allow modifying objects in validate* methods
+CAY-724 Bogus FaultFailureExceptions