cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [47/48] git commit: Installing Maven Failsafe Plugin
Date Sun, 02 Nov 2014 07:10:35 GMT
Installing Maven Failsafe Plugin


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/e42c376c
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/e42c376c
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/e42c376c

Branch: refs/heads/master
Commit: e42c376cd4a7652fde01569650217ad8ca25fc2c
Parents: fca0df5
Author: Savva Kolbechev <s.kolbachev@gmail.com>
Authored: Tue Oct 28 12:11:16 2014 +0300
Committer: Savva Kolbechev <s.kolbachev@gmail.com>
Committed: Tue Oct 28 12:11:18 2014 +0300

----------------------------------------------------------------------
 cayenne-client/pom.xml                          |   4 +
 .../query/SelectQueryAbstractEntityIT.java      | 110 +++
 .../query/SelectQueryAbstractEntityTest.java    | 110 ---
 cayenne-server/pom.xml                          |   4 +
 .../cayenne/CDOCollectionRelationshipIT.java    | 181 ++++
 .../cayenne/CDOCollectionRelationshipTest.java  | 181 ----
 .../java/org/apache/cayenne/CDOMany2OneIT.java  | 325 +++++++
 .../org/apache/cayenne/CDOMany2OneNoRevIT.java  |  56 ++
 .../apache/cayenne/CDOMany2OneNoRevTest.java    |  56 --
 .../org/apache/cayenne/CDOMany2OneTest.java     | 325 -------
 .../apache/cayenne/CDOMapRelationshipIT.java    | 234 +++++
 .../apache/cayenne/CDOMapRelationshipTest.java  | 234 -----
 .../java/org/apache/cayenne/CDOOne2ManyIT.java  | 299 +++++++
 .../org/apache/cayenne/CDOOne2ManyTest.java     | 299 -------
 .../org/apache/cayenne/CDOOne2OneDepIT.java     | 135 +++
 .../org/apache/cayenne/CDOOne2OneDepTest.java   | 135 ---
 .../org/apache/cayenne/CDOOneDep2OneIT.java     | 136 +++
 .../org/apache/cayenne/CDOOneDep2OneTest.java   | 136 ---
 .../org/apache/cayenne/CDOOneToManyFKIT.java    |  83 ++
 .../org/apache/cayenne/CDOOneToManyFKTest.java  |  83 --
 .../org/apache/cayenne/CDOOneToOneFKIT.java     | 197 +++++
 .../org/apache/cayenne/CDOOneToOneFKTest.java   | 197 -----
 .../apache/cayenne/CDOQualifiedEntitiesIT.java  | 126 +++
 .../cayenne/CDOQualifiedEntitiesTest.java       | 126 ---
 .../apache/cayenne/CDOReflexiveRelDeleteIT.java |  96 +++
 .../cayenne/CDOReflexiveRelDeleteTest.java      |  96 ---
 .../org/apache/cayenne/CDOReflexiveRelIT.java   | 120 +++
 .../org/apache/cayenne/CDOReflexiveRelTest.java | 120 ---
 .../apache/cayenne/CDOSetRelationshipIT.java    | 195 +++++
 .../apache/cayenne/CDOSetRelationshipTest.java  | 195 -----
 .../CayenneDataObjectFlattenedRelIT.java        | 280 ++++++
 .../CayenneDataObjectFlattenedRelTest.java      | 280 ------
 .../org/apache/cayenne/CayenneDataObjectIT.java | 153 ++++
 .../cayenne/CayenneDataObjectInContextIT.java   | 308 +++++++
 .../cayenne/CayenneDataObjectInContextTest.java | 308 -------
 .../CayenneDataObjectRelationshipsIT.java       | 293 +++++++
 .../CayenneDataObjectRelationshipsTest.java     | 293 -------
 .../apache/cayenne/CayenneDataObjectTest.java   | 153 ----
 .../cayenne/CayenneDataObjectValidationIT.java  | 121 +++
 .../CayenneDataObjectValidationTest.java        | 121 ---
 .../test/java/org/apache/cayenne/CayenneIT.java | 374 ++++++++
 .../java/org/apache/cayenne/CayenneTest.java    | 374 --------
 .../org/apache/cayenne/CompoundPkChangeIT.java  | 162 ++++
 .../apache/cayenne/CompoundPkChangeTest.java    | 162 ----
 .../cayenne/DataContextMaxIdQualifierIT.java    | 240 ++++++
 .../cayenne/DataContextMaxIdQualifierTest.java  | 240 ------
 .../cayenne/DataObjectSerializationIT.java      | 119 +++
 .../cayenne/DataObjectSerializationTest.java    | 119 ---
 .../cayenne/FlattenedRelationshipsIT.java       | 287 +++++++
 .../cayenne/FlattenedRelationshipsTest.java     | 287 -------
 .../org/apache/cayenne/GenericMappingIT.java    | 110 +++
 .../org/apache/cayenne/GenericMappingTest.java  | 110 ---
 .../org/apache/cayenne/ManyToManyNoJoinIT.java  |  59 ++
 .../apache/cayenne/ManyToManyNoJoinTest.java    |  59 --
 .../java/org/apache/cayenne/MeaningfulFKIT.java |  69 ++
 .../org/apache/cayenne/MeaningfulFKTest.java    |  69 --
 .../apache/cayenne/OneWayRelationshipsIT.java   | 217 +++++
 .../apache/cayenne/OneWayRelationshipsTest.java | 217 -----
 .../cayenne/PersistenceByReachabilityIT.java    | 103 +++
 .../cayenne/PersistenceByReachabilityTest.java  | 103 ---
 .../org/apache/cayenne/PersistentObjectIT.java  |  56 ++
 .../apache/cayenne/PersistentObjectTest.java    |  56 --
 .../org/apache/cayenne/PregeneratedPKIT.java    |  85 ++
 .../org/apache/cayenne/PregeneratedPKTest.java  |  85 --
 .../cayenne/access/DataContextBinaryPKIT.java   |  95 ++
 .../cayenne/access/DataContextBinaryPKTest.java |  95 --
 .../cayenne/access/DataContextBlobIT.java       | 189 ++++
 .../cayenne/access/DataContextBlobTest.java     | 189 ----
 .../cayenne/access/DataContextCallbacksIT.java  | 181 ++++
 .../access/DataContextCallbacksTest.java        | 181 ----
 .../cayenne/access/DataContextCharPKIT.java     | 120 +++
 .../cayenne/access/DataContextCharPKTest.java   | 120 ---
 .../cayenne/access/DataContextCharTypeIT.java   |  76 ++
 .../cayenne/access/DataContextCharTypeTest.java |  76 --
 .../cayenne/access/DataContextClobIT.java       | 158 ++++
 .../cayenne/access/DataContextClobTest.java     | 158 ----
 .../cayenne/access/DataContextCommitIT.java     | 116 +++
 .../cayenne/access/DataContextCommitTest.java   | 116 ---
 .../access/DataContextCompoundRelIT.java        | 153 ++++
 .../access/DataContextCompoundRelTest.java      | 153 ----
 .../cayenne/access/DataContextCrossDBIT.java    |  65 ++
 .../cayenne/access/DataContextCrossDBTest.java  |  65 --
 .../access/DataContextDataChannelEventsIT.java  | 190 ++++
 .../DataContextDataChannelEventsTest.java       | 190 ----
 .../access/DataContextDecoratedStackIT.java     | 131 +++
 .../access/DataContextDecoratedStackTest.java   | 131 ---
 .../cayenne/access/DataContextDelegateIT.java   | 163 ++++
 .../DataContextDelegateSharedCacheIT.java       | 216 +++++
 .../DataContextDelegateSharedCacheTest.java     | 216 -----
 .../cayenne/access/DataContextDelegateTest.java | 163 ----
 .../access/DataContextDeleteRulesIT.java        | 250 ++++++
 .../access/DataContextDeleteRulesTest.java      | 250 ------
 .../DataContextDisjointByIdPrefetchIT.java      | 219 +++++
 .../DataContextDisjointByIdPrefetchTest.java    | 219 -----
 ...ataContextDisjointByIdPrefetch_ExtrasIT.java | 373 ++++++++
 ...aContextDisjointByIdPrefetch_ExtrasTest.java | 373 --------
 .../access/DataContextEJBQLArrayResultIT.java   | 125 +++
 .../access/DataContextEJBQLArrayResultTest.java | 125 ---
 .../access/DataContextEJBQLConditionsIT.java    | 476 ++++++++++
 .../DataContextEJBQLConditionsPeopleIT.java     | 165 ++++
 .../DataContextEJBQLConditionsPeopleTest.java   | 165 ----
 .../access/DataContextEJBQLConditionsTest.java  | 476 ----------
 .../access/DataContextEJBQLDeleteIT.java        | 155 ++++
 .../access/DataContextEJBQLDeleteTest.java      | 155 ----
 .../access/DataContextEJBQLFetchJoinIT.java     | 417 +++++++++
 .../access/DataContextEJBQLFetchJoinTest.java   | 417 ---------
 ...ataContextEJBQLFlattenedRelationshipsIT.java | 319 +++++++
 ...aContextEJBQLFlattenedRelationshipsTest.java | 319 -------
 .../access/DataContextEJBQLGroupByHavingIT.java | 338 ++++++++
 .../DataContextEJBQLGroupByHavingTest.java      | 338 --------
 .../access/DataContextEJBQLInheritanceIT.java   |  90 ++
 .../access/DataContextEJBQLInheritanceTest.java |  90 --
 .../access/DataContextEJBQLIsNullIT.java        | 181 ++++
 .../access/DataContextEJBQLIsNullTest.java      | 181 ----
 .../cayenne/access/DataContextEJBQLJoinsIT.java | 234 +++++
 .../access/DataContextEJBQLJoinsTest.java       | 234 -----
 .../access/DataContextEJBQLOrderByIT.java       | 221 +++++
 .../access/DataContextEJBQLOrderByTest.java     | 221 -----
 .../cayenne/access/DataContextEJBQLQueryIT.java | 537 ++++++++++++
 .../access/DataContextEJBQLQueryTest.java       | 537 ------------
 .../access/DataContextEJBQLSubqueryIT.java      | 248 ++++++
 .../access/DataContextEJBQLSubqueryTest.java    | 248 ------
 .../access/DataContextEJBQLUpdateIT.java        | 333 +++++++
 .../access/DataContextEJBQLUpdateTest.java      | 333 -------
 .../DataContextEntityWithMeaningfulPKIT.java    | 130 +++
 .../DataContextEntityWithMeaningfulPKTest.java  | 130 ---
 .../DataContextExtendedTypeOperationsIT.java    | 100 +++
 .../DataContextExtendedTypeOperationsTest.java  | 100 ---
 .../cayenne/access/DataContextExtrasIT.java     | 421 +++++++++
 .../cayenne/access/DataContextExtrasTest.java   | 421 ---------
 .../DataContextFlattenedAttributesIT.java       | 385 +++++++++
 .../DataContextFlattenedAttributesTest.java     | 385 ---------
 .../apache/cayenne/access/DataContextIT.java    | 804 +++++++++++++++++
 .../access/DataContextJoinAliasesIT.java        | 115 +++
 .../access/DataContextJoinAliasesTest.java      | 115 ---
 .../access/DataContextLocalObjectIT.java        | 183 ++++
 .../access/DataContextLocalObjectTest.java      | 183 ----
 .../cayenne/access/DataContextNoPkIT.java       |  81 ++
 .../cayenne/access/DataContextNoPkTest.java     |  81 --
 .../access/DataContextObjectIdQueryIT.java      | 123 +++
 .../access/DataContextObjectIdQueryTest.java    | 123 ---
 .../access/DataContextObjectTrackingIT.java     | 139 +++
 .../access/DataContextObjectTrackingTest.java   | 139 ---
 .../cayenne/access/DataContextOrderingIT.java   | 127 +++
 .../cayenne/access/DataContextOrderingTest.java | 127 ---
 .../cayenne/access/DataContextOuterJoinsIT.java | 190 ++++
 .../access/DataContextOuterJoinsTest.java       | 190 ----
 .../access/DataContextPaginatedQueryIT.java     |  93 ++
 .../access/DataContextPaginatedQueryTest.java   |  93 --
 .../access/DataContextPerformQueryAPIIT.java    | 228 +++++
 .../access/DataContextPerformQueryAPITest.java  | 228 -----
 .../access/DataContextPrefetchExtras1IT.java    |  84 ++
 .../access/DataContextPrefetchExtras1Test.java  |  84 --
 .../access/DataContextPrefetchExtrasIT.java     | 174 ++++
 .../access/DataContextPrefetchExtrasTest.java   | 174 ----
 .../cayenne/access/DataContextPrefetchIT.java   | 801 +++++++++++++++++
 .../access/DataContextPrefetchMultistepIT.java  | 311 +++++++
 .../DataContextPrefetchMultistepTest.java       | 311 -------
 .../DataContextPrefetchQualifierOverlapIT.java  | 122 +++
 ...DataContextPrefetchQualifierOverlapTest.java | 122 ---
 .../cayenne/access/DataContextPrefetchTest.java | 801 -----------------
 .../access/DataContextProcedureQueryIT.java     | 429 ++++++++++
 .../access/DataContextProcedureQueryTest.java   | 429 ----------
 .../access/DataContextQualifiedEntityIT.java    | 119 +++
 .../access/DataContextQualifiedEntityTest.java  | 119 ---
 .../DataContextQueryCachingEhCacheIT.java       |  64 ++
 .../DataContextQueryCachingEhCacheTest.java     |  64 --
 .../access/DataContextQueryCachingIT.java       | 256 ++++++
 .../DataContextQueryCachingOSCacheIT.java       |  53 ++
 .../DataContextQueryCachingOSCacheTest.java     |  53 --
 .../access/DataContextQueryCachingTest.java     | 256 ------
 .../cayenne/access/DataContextQueryChainIT.java |  74 ++
 .../access/DataContextQueryChainTest.java       |  74 --
 .../access/DataContextRefreshQueryIT.java       | 440 ++++++++++
 .../access/DataContextRefreshQueryTest.java     | 440 ----------
 .../cayenne/access/DataContextRefreshingIT.java | 371 ++++++++
 .../access/DataContextRefreshingTest.java       | 371 --------
 .../access/DataContextRelationshipQueryIT.java  | 137 +++
 .../DataContextRelationshipQueryTest.java       | 137 ---
 .../cayenne/access/DataContextRollbackIT.java   | 224 +++++
 .../cayenne/access/DataContextRollbackTest.java | 224 -----
 .../access/DataContextSQLTemplateIT.java        | 635 ++++++++++++++
 .../access/DataContextSQLTemplateTest.java      | 635 --------------
 .../DataContextSelectQuerySplitAliasesIT.java   | 101 +++
 .../DataContextSelectQuerySplitAliasesTest.java | 101 ---
 .../access/DataContextSerializationIT.java      | 268 ++++++
 .../access/DataContextSerializationTest.java    | 268 ------
 .../access/DataContextSharedCacheEmpiricIT.java | 159 ++++
 .../DataContextSharedCacheEmpiricTest.java      | 159 ----
 .../access/DataContextSharedCacheIT.java        | 725 ++++++++++++++++
 .../access/DataContextSharedCacheTest.java      | 725 ----------------
 .../apache/cayenne/access/DataContextTest.java  | 804 -----------------
 .../cayenne/access/DataContextValidationIT.java | 104 +++
 .../access/DataContextValidationTest.java       | 104 ---
 .../cayenne/access/DataDomainCallbacksIT.java   | 471 ++++++++++
 .../cayenne/access/DataDomainCallbacksTest.java | 473 ----------
 .../cayenne/access/DataDomainFiltersIT.java     | 200 +++++
 .../cayenne/access/DataDomainFiltersTest.java   | 200 -----
 .../org/apache/cayenne/access/DataDomainIT.java | 256 ++++++
 .../cayenne/access/DataDomainQueryActionIT.java | 109 +++
 .../access/DataDomainQueryActionTest.java       | 109 ---
 .../apache/cayenne/access/DataDomainTest.java   | 256 ------
 .../org/apache/cayenne/access/DataNodeIT.java   |  86 ++
 .../cayenne/access/DataNodeQueriesIT.java       | 189 ++++
 .../cayenne/access/DataNodeQueriesTest.java     | 189 ----
 .../org/apache/cayenne/access/DataNodeTest.java |  88 --
 .../apache/cayenne/access/DataRowStoreIT.java   | 131 +++
 .../apache/cayenne/access/DataRowStoreTest.java | 131 ---
 .../apache/cayenne/access/DataRowUtilsIT.java   | 152 ++++
 .../apache/cayenne/access/DataRowUtilsTest.java | 152 ----
 .../apache/cayenne/access/DateTimeTypesIT.java  | 197 +++++
 .../cayenne/access/DateTimeTypesTest.java       | 197 -----
 .../apache/cayenne/access/DbGeneratorIT.java    |  96 +++
 .../apache/cayenne/access/DbGeneratorTest.java  |  96 ---
 .../org/apache/cayenne/access/DbLoaderIT.java   | 377 ++++++++
 .../cayenne/access/DbLoaderPartialIT.java       | 117 +++
 .../cayenne/access/DbLoaderPartialTest.java     | 118 ---
 .../org/apache/cayenne/access/DbLoaderTest.java | 377 --------
 .../apache/cayenne/access/DeleteObjectIT.java   | 225 +++++
 .../apache/cayenne/access/DeleteObjectTest.java | 225 -----
 .../apache/cayenne/access/DeleteRulesIT.java    | 374 ++++++++
 .../apache/cayenne/access/DeleteRulesTest.java  | 374 --------
 .../org/apache/cayenne/access/EmbeddingIT.java  | 179 ++++
 .../apache/cayenne/access/EmbeddingTest.java    | 179 ----
 .../java/org/apache/cayenne/access/EnumIT.java  |  89 ++
 .../org/apache/cayenne/access/EnumTest.java     |  89 --
 .../cayenne/access/FlattenedArcKeyIT.java       |  89 ++
 .../cayenne/access/FlattenedArcKeyTest.java     |  89 --
 .../cayenne/access/FlattenedPrefetchIT.java     | 267 ++++++
 .../cayenne/access/FlattenedPrefetchTest.java   | 267 ------
 .../FlattenedRelationshipInContextIT.java       | 100 +++
 .../FlattenedRelationshipInContextTest.java     | 100 ---
 .../cayenne/access/IdentityColumnsIT.java       | 331 +++++++
 .../cayenne/access/IdentityColumnsTest.java     | 331 -------
 .../cayenne/access/IncrementalFaultListIT.java  |  46 +
 .../access/IncrementalFaultListTest.java        |  46 -
 .../apache/cayenne/access/JointPrefetchIT.java  | 495 +++++++++++
 .../cayenne/access/JointPrefetchTest.java       | 495 -----------
 .../org/apache/cayenne/access/MiscTypesIT.java  | 186 ++++
 .../apache/cayenne/access/MiscTypesTest.java    | 186 ----
 .../access/NestedDataContextLocalCacheIT.java   |  77 ++
 .../access/NestedDataContextLocalCacheTest.java |  77 --
 .../access/NestedDataContextParentEventsIT.java |  61 ++
 .../NestedDataContextParentEventsTest.java      |  61 --
 .../NestedDataContextParentPeerEventsIT.java    | 141 +++
 .../NestedDataContextParentPeerEventsTest.java  | 141 ---
 .../access/NestedDataContextPeerEventsIT.java   | 181 ++++
 .../access/NestedDataContextPeerEventsTest.java | 181 ----
 .../cayenne/access/NestedDataContextReadIT.java | 376 ++++++++
 .../access/NestedDataContextReadTest.java       | 376 --------
 .../access/NestedDataContextRollbackIT.java     |  70 ++
 .../access/NestedDataContextRollbackTest.java   |  70 --
 .../access/NestedDataContextValidationIT.java   |  74 ++
 .../access/NestedDataContextValidationTest.java |  74 --
 .../access/NestedDataContextWriteIT.java        | 676 +++++++++++++++
 .../access/NestedDataContextWriteTest.java      | 676 ---------------
 .../access/NestedDataContext_DeadlockIT.java    | 128 +++
 .../access/NestedDataContext_DeadlockTest.java  | 128 ---
 .../apache/cayenne/access/NumericTypesIT.java   | 295 +++++++
 .../apache/cayenne/access/NumericTypesTest.java | 295 -------
 .../access/ObjectStoreDiffRetainingIT.java      | 107 +++
 .../access/ObjectStoreDiffRetainingTest.java    | 107 ---
 .../apache/cayenne/access/ObjectStoreGCIT.java  | 130 +++
 .../cayenne/access/ObjectStoreGCTest.java       | 130 ---
 .../apache/cayenne/access/ObjectStoreIT.java    | 133 +++
 .../apache/cayenne/access/ObjectStoreTest.java  | 133 ---
 .../cayenne/access/OptimisticLockingIT.java     | 498 +++++++++++
 .../cayenne/access/OptimisticLockingTest.java   | 498 -----------
 .../access/PrefetchProcessorTreeBuilderIT.java  | 207 +++++
 .../PrefetchProcessorTreeBuilderTest.java       | 207 -----
 .../cayenne/access/PrimitiveAttributesIT.java   |  47 +
 .../cayenne/access/PrimitiveAttributesTest.java |  47 -
 .../cayenne/access/QuotedIdentifiersIT.java     | 156 ++++
 .../cayenne/access/QuotedIdentifiersTest.java   | 156 ----
 .../cayenne/access/ReturnTypesMappingIT.java    | 858 +++++++++++++++++++
 .../cayenne/access/ReturnTypesMappingTest.java  | 858 -------------------
 .../SimpleIdIncrementalFaultListDataRowsIT.java | 219 +++++
 ...impleIdIncrementalFaultListDataRowsTest.java | 219 -----
 .../access/SimpleIdIncrementalFaultListIT.java  | 292 +++++++
 .../SimpleIdIncrementalFaultListPrefetchIT.java | 204 +++++
 ...impleIdIncrementalFaultListPrefetchTest.java | 204 -----
 .../SimpleIdIncrementalFaultListTest.java       | 292 -------
 .../access/SingleTableInheritance1IT.java       | 102 +++
 .../access/SingleTableInheritance1Test.java     | 102 ---
 .../access/SingleTableInheritanceIT.java        | 533 ++++++++++++
 .../access/SingleTableInheritanceTest.java      | 533 ------------
 .../org/apache/cayenne/access/ToManyListIT.java | 263 ++++++
 .../apache/cayenne/access/ToManyListTest.java   | 263 ------
 .../cayenne/access/TransactionThreadIT.java     | 118 +++
 .../cayenne/access/TransactionThreadTest.java   | 118 ---
 .../java/org/apache/cayenne/access/UUIDIT.java  |  93 ++
 .../org/apache/cayenne/access/UUIDTest.java     |  93 --
 .../cayenne/access/UserTransactionIT.java       | 103 +++
 .../cayenne/access/UserTransactionTest.java     | 103 ---
 .../cayenne/access/VerticalInheritanceIT.java   | 528 ++++++++++++
 .../cayenne/access/VerticalInheritanceTest.java | 528 ------------
 .../access/dbsync/SchemaUpdateStrategyIT.java   | 346 ++++++++
 .../access/dbsync/SchemaUpdateStrategyTest.java | 346 --------
 .../cayenne/access/jdbc/BatchActionIT.java      |  90 ++
 .../access/jdbc/BatchActionLockingIT.java       | 154 ++++
 .../access/jdbc/BatchActionLockingTest.java     | 155 ----
 .../cayenne/access/jdbc/BatchActionTest.java    |  90 --
 .../cayenne/access/jdbc/BindDirectiveIT.java    | 267 ++++++
 .../cayenne/access/jdbc/BindDirectiveTest.java  | 267 ------
 .../cayenne/access/jdbc/ResultDirectiveIT.java  | 187 ++++
 .../access/jdbc/ResultDirectiveTest.java        | 187 ----
 .../access/jdbc/SQLTemplateActionIT.java        | 365 ++++++++
 .../access/jdbc/SQLTemplateActionTest.java      | 365 --------
 .../cayenne/access/jdbc/SelectActionIT.java     |  98 +++
 .../cayenne/access/jdbc/SelectActionTest.java   |  98 ---
 .../batch/DefaultBatchTranslatorIT.java         | 136 +++
 .../batch/DefaultBatchTranslatorTest.java       | 136 ---
 .../batch/DeleteBatchTranslatorIT.java          | 153 ++++
 .../batch/DeleteBatchTranslatorTest.java        | 154 ----
 .../batch/InsertBatchTranslatorIT.java          |  93 ++
 .../batch/InsertBatchTranslatorTest.java        |  94 --
 .../batch/SoftDeleteBatchTranslatorIT.java      | 173 ++++
 .../batch/SoftDeleteBatchTranslatorTest.java    | 176 ----
 .../batch/UpdateBatchTranslatorIT.java          | 159 ++++
 .../batch/UpdateBatchTranslatorTest.java        | 160 ----
 .../ejbql/EJBQLSelectTranslatorIT.java          | 313 +++++++
 .../ejbql/EJBQLSelectTranslatorTest.java        | 316 -------
 .../translator/select/OrderingTranslatorIT.java | 178 ++++
 .../select/OrderingTranslatorTest.java          | 179 ----
 .../select/QualifierTranslatorIT.java           | 138 +++
 .../select/QualifierTranslatorTest.java         | 139 ---
 .../translator/select/QueryAssemblerIT.java     |  73 ++
 .../translator/select/QueryAssemblerTest.java   |  73 --
 .../translator/select/SelectTranslatorIT.java   | 770 +++++++++++++++++
 .../translator/select/SelectTranslatorTest.java | 771 -----------------
 .../access/util/DefaultOperationObserverIT.java |  42 +
 .../util/DefaultOperationObserverTest.java      |  42 -
 .../cayenne/ashwood/AshwoodEntitySorterIT.java  |  85 ++
 .../ashwood/AshwoodEntitySorterTest.java        |  85 --
 .../org/apache/cayenne/cache/QueryCacheIT.java  |  55 ++
 .../apache/cayenne/cache/QueryCacheTest.java    |  55 --
 .../server/JNDIDataSourceFactoryIT.java         | 102 +++
 .../server/JNDIDataSourceFactoryTest.java       | 104 ---
 .../ServerRuntimeBuilder_InAction_IT.java       |  90 ++
 .../ServerRuntimeBuilder_InAction_Test.java     |  91 --
 .../org/apache/cayenne/conn/PoolManagerIT.java  | 118 +++
 .../apache/cayenne/conn/PoolManagerTest.java    | 118 ---
 .../org/apache/cayenne/dba/AutoAdapterIT.java   |  67 ++
 .../org/apache/cayenne/dba/AutoAdapterTest.java |  67 --
 .../cayenne/dba/ConcurrentPkGeneratorIT.java    | 115 +++
 .../cayenne/dba/ConcurrentPkGeneratorTest.java  | 115 ---
 .../org/apache/cayenne/dba/JdbcAdapterIT.java   |  85 ++
 .../org/apache/cayenne/dba/JdbcAdapterTest.java |  85 --
 .../apache/cayenne/dba/JdbcPkGeneratorIT.java   |  88 ++
 .../apache/cayenne/dba/JdbcPkGeneratorTest.java |  88 --
 .../org/apache/cayenne/dba/PkGeneratorIT.java   |  84 ++
 .../org/apache/cayenne/dba/PkGeneratorTest.java |  84 --
 .../org/apache/cayenne/dba/TypesMappingIT.java  | 138 +++
 .../apache/cayenne/dba/TypesMappingTest.java    | 138 ---
 .../cayenne/dba/hsqldb/HSQLDBAdapterIT.java     |  68 ++
 .../cayenne/dba/hsqldb/HSQLDBAdapterTest.java   |  68 --
 .../cayenne/dba/mysql/MySQLAdapterIT.java       |  65 ++
 .../cayenne/dba/mysql/MySQLAdapterTest.java     |  65 --
 .../cayenne/dba/oracle/Oracle8AdapterIT.java    |  59 ++
 .../cayenne/dba/oracle/Oracle8AdapterTest.java  |  59 --
 .../cayenne/dba/oracle/OracleAdapterIT.java     |  62 ++
 .../cayenne/dba/oracle/OracleAdapterTest.java   |  62 --
 .../cayenne/dba/oracle/OraclePkGeneratorIT.java |  68 ++
 .../dba/oracle/OraclePkGeneratorTest.java       |  68 --
 .../cayenne/dba/postgres/PostgresAdapterIT.java |  56 ++
 .../dba/postgres/PostgresAdapterTest.java       |  56 --
 .../dba/sqlserver/SQLServerAdapterIT.java       |  55 ++
 .../dba/sqlserver/SQLServerAdapterTest.java     |  55 --
 .../dba/sqlserver/SQLServerSnifferIT.java       |  72 ++
 .../dba/sqlserver/SQLServerSnifferTest.java     |  72 --
 .../ejbql/EJBQLCompiledExpressionIT.java        | 111 +++
 .../ejbql/EJBQLCompiledExpressionTest.java      | 111 ---
 .../exp/ExpressionFactory_InContextIT.java      | 319 +++++++
 .../exp/ExpressionFactory_InContextTest.java    | 319 -------
 .../cayenne/exp/Expression_InContextIT.java     | 132 +++
 .../cayenne/exp/Expression_InContextTest.java   | 132 ---
 .../cayenne/exp/ParsedExpQualifierCompatIT.java | 289 +++++++
 .../exp/ParsedExpQualifierCompatTest.java       | 289 -------
 .../parser/ExpressionEvaluateInMemoryIT.java    | 576 +++++++++++++
 .../parser/ExpressionEvaluateInMemoryTest.java  | 576 -------------
 .../cayenne/map/ClientEntityResolverIT.java     |  93 ++
 .../cayenne/map/ClientEntityResolverTest.java   |  93 --
 .../java/org/apache/cayenne/map/DbEntityIT.java | 254 ++++++
 .../org/apache/cayenne/map/DbEntityTest.java    | 254 ------
 .../apache/cayenne/map/DbRelationshipIT.java    | 110 +++
 .../apache/cayenne/map/DbRelationshipTest.java  | 110 ---
 .../java/org/apache/cayenne/map/EntityIT.java   | 204 +++++
 .../map/EntityResolverClassDescriptorIT.java    |  95 ++
 .../map/EntityResolverClassDescriptorTest.java  |  95 --
 .../map/EntityResolverGenericStackIT.java       |  57 ++
 .../map/EntityResolverGenericStackTest.java     |  57 --
 .../apache/cayenne/map/EntityResolverIT.java    | 171 ++++
 .../map/EntityResolverInheritanceIT.java        |  78 ++
 .../map/EntityResolverInheritanceTest.java      |  78 --
 .../apache/cayenne/map/EntityResolverTest.java  | 171 ----
 .../java/org/apache/cayenne/map/EntityTest.java | 204 -----
 .../org/apache/cayenne/map/ObjEntityIT.java     | 431 ++++++++++
 .../org/apache/cayenne/map/ObjEntityTest.java   | 431 ----------
 .../apache/cayenne/map/ObjRelationshipIT.java   | 495 +++++++++++
 .../apache/cayenne/map/ObjRelationshipTest.java | 495 -----------
 .../cayenne/merge/AddColumnToModelIT.java       |  94 ++
 .../cayenne/merge/AddColumnToModelTest.java     |  94 --
 .../cayenne/merge/CreateTableToModelIT.java     |  97 +++
 .../cayenne/merge/CreateTableToModelTest.java   |  97 ---
 .../cayenne/merge/DropColumnToModelIT.java      | 226 +++++
 .../cayenne/merge/DropColumnToModelTest.java    | 226 -----
 .../merge/DropRelationshipToModelIT.java        | 177 ++++
 .../merge/DropRelationshipToModelTest.java      | 177 ----
 .../cayenne/merge/DropTableToModelIT.java       |  90 ++
 .../cayenne/merge/DropTableToModelTest.java     |  90 --
 .../apache/cayenne/merge/MergerFactoryIT.java   | 306 +++++++
 .../apache/cayenne/merge/MergerFactoryTest.java | 306 -------
 .../cayenne/merge/SetAllowNullToDbIT.java       |  66 ++
 .../cayenne/merge/SetAllowNullToDbTest.java     |  66 --
 .../apache/cayenne/merge/SetNotNullToDbIT.java  |  76 ++
 .../cayenne/merge/SetNotNullToDbTest.java       |  76 --
 .../cayenne/merge/SetPrimaryKeyToDbIT.java      |  59 ++
 .../cayenne/merge/SetPrimaryKeyToDbTest.java    |  59 --
 .../apache/cayenne/merge/ValueForNullIT.java    | 126 +++
 .../apache/cayenne/merge/ValueForNullTest.java  | 127 ---
 .../org/apache/cayenne/query/EJBQLQueryIT.java  | 492 +++++++++++
 .../apache/cayenne/query/EJBQLQueryTest.java    | 492 -----------
 .../cayenne/query/ProcedureQueryCacheKeyIT.java | 107 +++
 .../query/ProcedureQueryCacheKeyTest.java       | 107 ---
 .../org/apache/cayenne/query/QueryChainIT.java  |  63 ++
 .../apache/cayenne/query/QueryChainTest.java    |  63 --
 .../org/apache/cayenne/query/SQLSelectIT.java   | 213 +++++
 .../org/apache/cayenne/query/SQLSelectTest.java | 213 -----
 .../cayenne/query/SQLTemplateCacheKeyIT.java    |  96 +++
 .../cayenne/query/SQLTemplateCacheKeyTest.java  |  96 ---
 .../org/apache/cayenne/query/SQLTemplateIT.java | 211 +++++
 .../apache/cayenne/query/SQLTemplateTest.java   | 211 -----
 .../org/apache/cayenne/query/SelectByIdIT.java  | 193 +++++
 .../apache/cayenne/query/SelectByIdTest.java    | 193 -----
 .../cayenne/query/SelectQueryCacheKeyIT.java    | 181 ++++
 .../cayenne/query/SelectQueryCacheKeyTest.java  | 181 ----
 .../query/SelectQueryFetchLimitOrderingIT.java  |  81 ++
 .../SelectQueryFetchLimitOrderingTest.java      |  81 --
 .../org/apache/cayenne/query/SelectQueryIT.java | 796 +++++++++++++++++
 .../SelectQueryPrefetchRouterActionIT.java      |  90 ++
 ...ryPrefetchRouterActionQualifiedEntityIT.java |  75 ++
 ...PrefetchRouterActionQualifiedEntityTest.java |  75 --
 .../SelectQueryPrefetchRouterActionTest.java    |  90 --
 .../apache/cayenne/query/SelectQueryTest.java   | 796 -----------------
 .../cayenne/query/StatementFetchSizeIT.java     |  73 ++
 .../cayenne/query/StatementFetchSizeTest.java   |  73 --
 .../reflect/LifecycleCallbackRegistryIT.java    | 115 +++
 .../reflect/LifecycleCallbackRegistryTest.java  | 115 ---
 ...LifecycleCallbackRegistry_InheritanceIT.java |  79 ++
 ...fecycleCallbackRegistry_InheritanceTest.java |  79 --
 .../reflect/MixedPersistenceStrategyIT.java     | 106 +++
 .../reflect/MixedPersistenceStrategyTest.java   | 106 ---
 .../generic/DataObjectDescriptorFactoryIT.java  | 138 +++
 .../DataObjectDescriptorFactoryTest.java        | 138 ---
 ...jectDescriptorFactory_InheritanceMapsIT.java |  78 ++
 ...ctDescriptorFactory_InheritanceMapsTest.java |  78 --
 .../cayenne/tx/DefaultTransactionManagerIT.java |  75 ++
 .../tx/DefaultTransactionManagerTest.java       |  75 --
 .../cayenne/unit/OracleUnitDbAdapter.java       |  18 +-
 .../apache/cayenne/unit/di/DICaseSelfIT.java    |  81 ++
 .../apache/cayenne/unit/di/DICaseSelfTest.java  |  81 --
 .../unit/di/server/ServerCaseSelfIT.java        |  52 ++
 .../unit/di/server/ServerCaseSelfTest.java      |  52 --
 .../org/apache/cayenne/unit/jira/CAY_115IT.java | 115 +++
 .../apache/cayenne/unit/jira/CAY_115Test.java   | 115 ---
 .../org/apache/cayenne/unit/jira/CAY_191IT.java |  79 ++
 .../apache/cayenne/unit/jira/CAY_191Test.java   |  79 --
 .../org/apache/cayenne/unit/jira/CAY_194IT.java | 107 +++
 .../apache/cayenne/unit/jira/CAY_194Test.java   | 107 ---
 .../cayenne/util/DeepMergeOperationIT.java      |  85 ++
 .../util/DeepMergeOperationInheritanceIT.java   | 140 +++
 .../util/DeepMergeOperationInheritanceTest.java | 140 ---
 .../cayenne/util/DeepMergeOperationTest.java    |  85 --
 .../cayenne/util/EntityMergeSupportIT.java      |  99 +++
 .../cayenne/util/EntityMergeSupportTest.java    |  99 ---
 .../cayenne/util/ShallowMergeOperationIT.java   | 210 +++++
 .../cayenne/util/ShallowMergeOperationTest.java | 210 -----
 pom.xml                                         |  14 +
 478 files changed, 46325 insertions(+), 46325 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-client/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-client/pom.xml b/cayenne-client/pom.xml
index 103790a..9e1f38c 100644
--- a/cayenne-client/pom.xml
+++ b/cayenne-client/pom.xml
@@ -97,6 +97,10 @@
             <plugin>
                 <artifactId>maven-pmd-plugin</artifactId>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+            </plugin>
         </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java b/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
new file mode 100644
index 0000000..66d3b94
--- /dev/null
+++ b/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityIT.java
@@ -0,0 +1,110 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.query;
+
+import org.apache.cayenne.ObjectContext;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.mt.MtTable1;
+import org.apache.cayenne.testdo.mt.MtTable1Subclass1;
+import org.apache.cayenne.testdo.mt.MtTable1Subclass2;
+import org.apache.cayenne.unit.di.client.ClientCase;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+
+import java.util.List;
+
+@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
+public class SelectQueryAbstractEntityIT extends ServerCase {
+    
+    @Inject
+    private ObjectContext context;
+
+    @Inject
+    private DBHelper dbHelper;
+    
+    private TableHelper mtTable;
+    
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("MT_TABLE1");
+        
+        mtTable = new TableHelper(dbHelper, "MT_TABLE1");
+        mtTable.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1", "SUBCLASS_ATTRIBUTE1");
+    }
+    
+    protected void createDataSet() throws Exception{     
+
+        for (int i = 1; i <= 10; i++){
+            mtTable.insert(i, "sub2", "sub2_" + i, "sub2attr");
+        }
+        
+        for (int i = 11; i <= 20; i++){
+            mtTable.insert(i, "sub1", "sub1_" + i, "sub1attr");
+        }
+       
+    }
+    
+    public void testSublclassEntitySelect() throws Exception{
+        createDataSet();
+        
+        SelectQuery<MtTable1Subclass1> query = 
+                new SelectQuery<MtTable1Subclass1>(MtTable1Subclass1.class);
+        final List<MtTable1Subclass1> sub1List = context.select(query);
+        
+        SelectQuery<MtTable1Subclass2> query2 = 
+                new SelectQuery<MtTable1Subclass2>(MtTable1Subclass2.class);
+        final List<MtTable1Subclass2> sub2List = context.select(query2);
+        
+        assertNotNull(sub1List);
+        assertNotNull(sub2List);
+    }
+    
+    public void test1AbstractEntitySelect() throws Exception{
+        createDataSet();
+
+        SelectQuery<MtTable1> query = new SelectQuery<MtTable1>(MtTable1.class);
+        final List<MtTable1> list = context.select(query);
+
+        assertNotNull(list);
+
+        for (MtTable1 sub : list){
+            if(sub instanceof MtTable1Subclass1){
+                assertNotNull(((MtTable1Subclass1) sub).getSubclass1Attribute1());
+            }
+        }
+    }
+    
+    public void test2AbstractEntitySelect() throws Exception{
+        createDataSet();
+        
+        SelectQuery<MtTable1> query = new SelectQuery<MtTable1>(MtTable1.class);
+        final List<MtTable1> list = context.select(query);
+        
+        assertNotNull(list);
+        
+        for (MtTable1 sub : list){
+            if(sub instanceof MtTable1Subclass2){
+                assertNotNull(((MtTable1Subclass2) sub).getSubclass2Attribute1());
+            }
+        }
+    }
+    
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityTest.java
----------------------------------------------------------------------
diff --git a/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityTest.java b/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityTest.java
deleted file mode 100644
index 9353fc9..0000000
--- a/cayenne-client/src/test/java/org/apache/cayenne/query/SelectQueryAbstractEntityTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne.query;
-
-import java.util.List;
-
-import org.apache.cayenne.ObjectContext;
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.apache.cayenne.testdo.mt.MtTable1;
-import org.apache.cayenne.testdo.mt.MtTable1Subclass1;
-import org.apache.cayenne.testdo.mt.MtTable1Subclass2;
-import org.apache.cayenne.unit.di.client.ClientCase;
-import org.apache.cayenne.unit.di.server.ServerCase;
-import org.apache.cayenne.unit.di.server.UseServerRuntime;
-
-@UseServerRuntime(ClientCase.MULTI_TIER_PROJECT)
-public class SelectQueryAbstractEntityTest extends ServerCase {
-    
-    @Inject
-    private ObjectContext context;
-
-    @Inject
-    private DBHelper dbHelper;
-    
-    private TableHelper mtTable;
-    
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("MT_TABLE1");
-        
-        mtTable = new TableHelper(dbHelper, "MT_TABLE1");
-        mtTable.setColumns("TABLE1_ID", "GLOBAL_ATTRIBUTE1", "SERVER_ATTRIBUTE1", "SUBCLASS_ATTRIBUTE1");
-    }
-    
-    protected void createDataSet() throws Exception{     
-
-        for (int i = 1; i <= 10; i++){
-            mtTable.insert(i, "sub2", "sub2_" + i, "sub2attr");
-        }
-        
-        for (int i = 11; i <= 20; i++){
-            mtTable.insert(i, "sub1", "sub1_" + i, "sub1attr");
-        }
-       
-    }
-    
-    public void testSublclassEntitySelect() throws Exception{
-        createDataSet();
-        
-        SelectQuery<MtTable1Subclass1> query = 
-                new SelectQuery<MtTable1Subclass1>(MtTable1Subclass1.class);
-        final List<MtTable1Subclass1> sub1List = context.select(query);
-        
-        SelectQuery<MtTable1Subclass2> query2 = 
-                new SelectQuery<MtTable1Subclass2>(MtTable1Subclass2.class);
-        final List<MtTable1Subclass2> sub2List = context.select(query2);
-        
-        assertNotNull(sub1List);
-        assertNotNull(sub2List);
-    }
-    
-    public void test1AbstractEntitySelect() throws Exception{
-        createDataSet();
-
-        SelectQuery<MtTable1> query = new SelectQuery<MtTable1>(MtTable1.class);
-        final List<MtTable1> list = context.select(query);
-
-        assertNotNull(list);
-
-        for (MtTable1 sub : list){
-            if(sub instanceof MtTable1Subclass1){
-                assertNotNull(((MtTable1Subclass1) sub).getSubclass1Attribute1());
-            }
-        }
-    }
-    
-    public void test2AbstractEntitySelect() throws Exception{
-        createDataSet();
-        
-        SelectQuery<MtTable1> query = new SelectQuery<MtTable1>(MtTable1.class);
-        final List<MtTable1> list = context.select(query);
-        
-        assertNotNull(list);
-        
-        for (MtTable1 sub : list){
-            if(sub instanceof MtTable1Subclass2){
-                assertNotNull(((MtTable1Subclass2) sub).getSubclass2Attribute1());
-            }
-        }
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/pom.xml b/cayenne-server/pom.xml
index 80b83dd..47bc27e 100644
--- a/cayenne-server/pom.xml
+++ b/cayenne-server/pom.xml
@@ -272,6 +272,10 @@
                     </excludes>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-failsafe-plugin</artifactId>
+            </plugin>
         </plugins>
 	</build>
 </project>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipIT.java
new file mode 100644
index 0000000..dc9c133
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipIT.java
@@ -0,0 +1,181 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne;
+
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.query.RefreshQuery;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.relationship.CollectionToMany;
+import org.apache.cayenne.testdo.relationship.CollectionToManyTarget;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+
+import java.util.Collection;
+
+@UseServerRuntime(ServerCase.RELATIONSHIPS_PROJECT)
+public class CDOCollectionRelationshipIT extends ServerCase {
+
+    @Inject
+    private ObjectContext context;
+
+    @Inject
+    private DBHelper dbHelper;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("COLLECTION_TO_MANY_TARGET");
+        dbHelper.deleteAll("COLLECTION_TO_MANY");
+
+        TableHelper tCollectionToMany = new TableHelper(dbHelper, "COLLECTION_TO_MANY");
+        tCollectionToMany.setColumns("ID");
+
+        TableHelper tCollectionToManyTarget = new TableHelper(
+                dbHelper,
+                "COLLECTION_TO_MANY_TARGET");
+        tCollectionToManyTarget.setColumns("ID", "COLLECTION_TO_MANY_ID");
+
+        // single data set for all tests
+        tCollectionToMany.insert(1).insert(2);
+        tCollectionToManyTarget.insert(1, 1).insert(2, 1).insert(3, 1).insert(4, 2);
+    }
+
+    public void testReadToMany() throws Exception {
+
+        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
+
+        Collection<?> targets = o1.getTargets();
+
+        assertNotNull(targets);
+        assertTrue(((ValueHolder) targets).isFault());
+
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                3)));
+    }
+
+    public void testReadToManyPrefetching() throws Exception {
+
+        SelectQuery query = new SelectQuery(CollectionToMany.class, ExpressionFactory
+                .matchDbExp(CollectionToMany.ID_PK_COLUMN, new Integer(1)));
+        query.addPrefetch(CollectionToMany.TARGETS_PROPERTY);
+        CollectionToMany o1 = (CollectionToMany) Cayenne.objectForQuery(context, query);
+
+        Collection<?> targets = o1.getTargets();
+
+        assertFalse(((ValueHolder) targets).isFault());
+
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                1)));
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                2)));
+        assertTrue(targets.contains(Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                3)));
+    }
+
+    public void testAddToMany() throws Exception {
+
+        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
+
+        Collection<?> targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget newTarget = o1.getObjectContext().newObject(
+                CollectionToManyTarget.class);
+
+        o1.addToTargets(newTarget);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+
+    public void testRemoveToMany() throws Exception {
+
+        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
+
+        Collection<?> targets = o1.getTargets();
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget target = Cayenne.objectForPK(
+                o1.getObjectContext(),
+                CollectionToManyTarget.class,
+                2);
+        o1.removeFromTargets(target);
+
+        assertEquals(2, targets.size());
+        assertFalse(o1.getTargets().contains(target));
+        assertNull(target.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(2, o1.getTargets().size());
+        assertFalse(o1.getTargets().contains(target));
+    }
+
+    public void testAddToManyViaReverse() throws Exception {
+
+        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
+
+        Collection<?> targets = o1.getTargets();
+        assertNotNull(targets);
+        assertEquals(3, targets.size());
+
+        CollectionToManyTarget newTarget = o1.getObjectContext().newObject(
+                CollectionToManyTarget.class);
+
+        newTarget.setCollectionToMany(o1);
+        assertEquals(4, targets.size());
+        assertTrue(o1.getTargets().contains(newTarget));
+        assertSame(o1, newTarget.getCollectionToMany());
+
+        o1.getObjectContext().commitChanges();
+
+        o1.getObjectContext().performGenericQuery(new RefreshQuery());
+        assertEquals(4, o1.getTargets().size());
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java
deleted file mode 100644
index 5fd4c08..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/CDOCollectionRelationshipTest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-package org.apache.cayenne;
-
-import java.util.Collection;
-
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.RefreshQuery;
-import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.apache.cayenne.testdo.relationship.CollectionToMany;
-import org.apache.cayenne.testdo.relationship.CollectionToManyTarget;
-import org.apache.cayenne.unit.di.server.ServerCase;
-import org.apache.cayenne.unit.di.server.UseServerRuntime;
-
-@UseServerRuntime(ServerCase.RELATIONSHIPS_PROJECT)
-public class CDOCollectionRelationshipTest extends ServerCase {
-
-    @Inject
-    private ObjectContext context;
-
-    @Inject
-    private DBHelper dbHelper;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("COLLECTION_TO_MANY_TARGET");
-        dbHelper.deleteAll("COLLECTION_TO_MANY");
-
-        TableHelper tCollectionToMany = new TableHelper(dbHelper, "COLLECTION_TO_MANY");
-        tCollectionToMany.setColumns("ID");
-
-        TableHelper tCollectionToManyTarget = new TableHelper(
-                dbHelper,
-                "COLLECTION_TO_MANY_TARGET");
-        tCollectionToManyTarget.setColumns("ID", "COLLECTION_TO_MANY_ID");
-
-        // single data set for all tests
-        tCollectionToMany.insert(1).insert(2);
-        tCollectionToManyTarget.insert(1, 1).insert(2, 1).insert(3, 1).insert(4, 2);
-    }
-
-    public void testReadToMany() throws Exception {
-
-        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
-
-        Collection<?> targets = o1.getTargets();
-
-        assertNotNull(targets);
-        assertTrue(((ValueHolder) targets).isFault());
-
-        assertEquals(3, targets.size());
-
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                1)));
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                2)));
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                3)));
-    }
-
-    public void testReadToManyPrefetching() throws Exception {
-
-        SelectQuery query = new SelectQuery(CollectionToMany.class, ExpressionFactory
-                .matchDbExp(CollectionToMany.ID_PK_COLUMN, new Integer(1)));
-        query.addPrefetch(CollectionToMany.TARGETS_PROPERTY);
-        CollectionToMany o1 = (CollectionToMany) Cayenne.objectForQuery(context, query);
-
-        Collection<?> targets = o1.getTargets();
-
-        assertFalse(((ValueHolder) targets).isFault());
-
-        assertNotNull(targets);
-        assertEquals(3, targets.size());
-
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                1)));
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                2)));
-        assertTrue(targets.contains(Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                3)));
-    }
-
-    public void testAddToMany() throws Exception {
-
-        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
-
-        Collection<?> targets = o1.getTargets();
-        assertNotNull(targets);
-        assertEquals(3, targets.size());
-
-        CollectionToManyTarget newTarget = o1.getObjectContext().newObject(
-                CollectionToManyTarget.class);
-
-        o1.addToTargets(newTarget);
-        assertEquals(4, targets.size());
-        assertTrue(o1.getTargets().contains(newTarget));
-        assertSame(o1, newTarget.getCollectionToMany());
-
-        o1.getObjectContext().commitChanges();
-
-        o1.getObjectContext().performGenericQuery(new RefreshQuery());
-        assertEquals(4, o1.getTargets().size());
-    }
-
-    public void testRemoveToMany() throws Exception {
-
-        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
-
-        Collection<?> targets = o1.getTargets();
-        assertEquals(3, targets.size());
-
-        CollectionToManyTarget target = Cayenne.objectForPK(
-                o1.getObjectContext(),
-                CollectionToManyTarget.class,
-                2);
-        o1.removeFromTargets(target);
-
-        assertEquals(2, targets.size());
-        assertFalse(o1.getTargets().contains(target));
-        assertNull(target.getCollectionToMany());
-
-        o1.getObjectContext().commitChanges();
-
-        o1.getObjectContext().performGenericQuery(new RefreshQuery());
-        assertEquals(2, o1.getTargets().size());
-        assertFalse(o1.getTargets().contains(target));
-    }
-
-    public void testAddToManyViaReverse() throws Exception {
-
-        CollectionToMany o1 = Cayenne.objectForPK(context, CollectionToMany.class, 1);
-
-        Collection<?> targets = o1.getTargets();
-        assertNotNull(targets);
-        assertEquals(3, targets.size());
-
-        CollectionToManyTarget newTarget = o1.getObjectContext().newObject(
-                CollectionToManyTarget.class);
-
-        newTarget.setCollectionToMany(o1);
-        assertEquals(4, targets.size());
-        assertTrue(o1.getTargets().contains(newTarget));
-        assertSame(o1, newTarget.getCollectionToMany());
-
-        o1.getObjectContext().commitChanges();
-
-        o1.getObjectContext().performGenericQuery(new RefreshQuery());
-        assertEquals(4, o1.getTargets().size());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneIT.java
new file mode 100644
index 0000000..899ad6f
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneIT.java
@@ -0,0 +1,325 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne;
+
+import org.apache.cayenne.configuration.server.ServerRuntime;
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.exp.Expression;
+import org.apache.cayenne.exp.ExpressionFactory;
+import org.apache.cayenne.query.CapsStrategy;
+import org.apache.cayenne.query.SQLTemplate;
+import org.apache.cayenne.query.SelectQuery;
+import org.apache.cayenne.test.jdbc.DBHelper;
+import org.apache.cayenne.test.jdbc.TableHelper;
+import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.testdo.testmap.Gallery;
+import org.apache.cayenne.testdo.testmap.Painting;
+import org.apache.cayenne.testdo.testmap.ROPainting;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+
+import java.sql.Types;
+import java.util.List;
+import java.util.Map;
+
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class CDOMany2OneIT extends ServerCase {
+
+    @Inject
+    private ServerRuntime runtime;
+
+    @Inject
+    private ObjectContext context;
+
+    @Inject
+    private DBHelper dbHelper;
+
+    protected TableHelper tArtist;
+    protected TableHelper tPainting;
+    protected TableHelper tGallery;
+
+    @Override
+    protected void setUpAfterInjection() throws Exception {
+        dbHelper.deleteAll("PAINTING_INFO");
+        dbHelper.deleteAll("PAINTING");
+        dbHelper.deleteAll("ARTIST_EXHIBIT");
+        dbHelper.deleteAll("ARTIST_GROUP");
+        dbHelper.deleteAll("ARTIST");
+        dbHelper.deleteAll("EXHIBIT");
+        dbHelper.deleteAll("GALLERY");
+
+        tArtist = new TableHelper(dbHelper, "ARTIST");
+        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
+
+        tPainting = new TableHelper(dbHelper, "PAINTING");
+        tPainting
+                .setColumns("PAINTING_ID", "PAINTING_TITLE", "ARTIST_ID", "GALLERY_ID")
+                .setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.BIGINT, Types.INTEGER);
+
+        tGallery = new TableHelper(dbHelper, "GALLERY");
+        tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
+    }
+
+    private void createArtistWithPaintingDataSet() throws Exception {
+        tArtist.insert(8, "aX");
+        tPainting.insert(6, "pW", 8, null);
+    }
+
+    private void createArtistWithPaintingsInGalleryDataSet() throws Exception {
+        tArtist.insert(8, "aX");
+        tGallery.insert(11, "Ge");
+        tPainting.insert(6, "pW1", 8, 11);
+        tPainting.insert(7, "pW2", 8, 11);
+
+    }
+
+    public void testMultipleToOneDeletion() throws Exception {
+
+        // was a problem per CAY-901
+
+        Painting p = context.newObject(Painting.class);
+        p.setPaintingTitle("P1");
+
+        Artist a = context.newObject(Artist.class);
+        a.setArtistName("A1");
+
+        Gallery g = context.newObject(Gallery.class);
+        g.setGalleryName("G1");
+
+        p.setToArtist(a);
+        p.setToGallery(g);
+        context.commitChanges();
+
+        p.setToArtist(null);
+        p.setToGallery(null);
+
+        context.commitChanges();
+
+        SQLTemplate q = new SQLTemplate(Painting.class, "SELECT * from PAINTING");
+        q.setColumnNamesCapitalization(CapsStrategy.UPPER);
+        q.setFetchingDataRows(true);
+
+        Map<String, ?> row = (Map<String, ?>) Cayenne.objectForQuery(context, q);
+        assertEquals("P1", row.get("PAINTING_TITLE"));
+        assertEquals(null, row.get("ARTIST_ID"));
+        assertEquals(null, row.get("GALLERY_ID"));
+    }
+
+    public void testReadRO1() throws Exception {
+
+        createArtistWithPaintingDataSet();
+
+        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
+
+        Expression e = ExpressionFactory.matchExp(ROPainting.TO_ARTIST_PROPERTY, a1);
+        SelectQuery q = new SelectQuery(ROPainting.class, e);
+
+        List<ROPainting> paints = context.performQuery(q);
+        assertEquals(1, paints.size());
+
+        ROPainting rop1 = paints.get(0);
+        assertSame(a1, rop1.getToArtist());
+    }
+
+    public void testReadRO2() throws Exception {
+
+        createArtistWithPaintingDataSet();
+
+        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
+
+        Expression e = ExpressionFactory.matchExp(ROPainting.TO_ARTIST_PROPERTY, a1);
+        SelectQuery q = new SelectQuery(ROPainting.class, e);
+
+        List<ROPainting> paints = context.performQuery(q);
+        assertEquals(1, paints.size());
+
+        ROPainting rop1 = paints.get(0);
+        assertNotNull(rop1.getToArtist());
+
+        // trigger fetch
+        rop1.getToArtist().getArtistName();
+        assertEquals(PersistenceState.COMMITTED, rop1.getToArtist().getPersistenceState());
+    }
+
+    public void testSelectViaRelationship() throws Exception {
+
+        createArtistWithPaintingDataSet();
+        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
+        Painting p1 = Cayenne.objectForPK(context, Painting.class, 6);
+
+        Expression e = ExpressionFactory.matchExp(Painting.TO_ARTIST_PROPERTY, a1);
+        SelectQuery q = new SelectQuery(Painting.class, e);
+
+        List<Painting> paints = context.performQuery(q);
+        assertEquals(1, paints.size());
+        assertSame(p1, paints.get(0));
+    }
+
+    public void testSelectViaMultiRelationship() throws Exception {
+
+        createArtistWithPaintingsInGalleryDataSet();
+
+        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
+        Gallery g1 = Cayenne.objectForPK(context, Gallery.class, 11);
+
+        Expression e = ExpressionFactory.matchExp("paintingArray.toGallery", g1);
+        SelectQuery q = new SelectQuery("Artist", e);
+
+        List<Artist> artists = context.performQuery(q);
+        assertEquals(1, artists.size());
+        assertSame(a1, artists.get(0));
+    }
+
+    public void testNewAdd() throws Exception {
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("bL");
+
+        Painting p1 = context.newObject(Painting.class);
+        p1.setPaintingTitle("xa");
+
+        p1.setToArtist(a1);
+
+        assertSame(a1, p1.getToArtist());
+        assertEquals(1, a1.getPaintingArray().size());
+        assertSame(p1, a1.getPaintingArray().get(0));
+
+        context.commitChanges();
+
+        assertEquals(Cayenne.longPKForObject(a1), tArtist.getLong("ARTIST_ID"));
+        assertEquals(Cayenne.longPKForObject(a1), tPainting.getLong("ARTIST_ID"));
+    }
+
+    public void testRemove() throws Exception {
+        Painting p1 = context.newObject(Painting.class);
+        p1.setPaintingTitle("xa");
+
+        Gallery g1 = context.newObject(Gallery.class);
+        g1.setGalleryName("yT");
+
+        p1.setToGallery(g1);
+
+        // do save
+        context.commitChanges();
+
+        ObjectContext context2 = runtime.newContext();
+
+        // test database data
+        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
+                Painting.class));
+        Gallery g2 = p2.getToGallery();
+
+        p2.setToGallery(null);
+
+        // test before save
+        assertEquals(0, g2.getPaintingArray().size());
+        assertNull(p2.getToGallery());
+
+        // do save II
+        context2.commitChanges();
+
+        ObjectContext context3 = runtime.newContext();
+
+        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
+                Painting.class));
+        assertNull(p3.getToGallery());
+    }
+
+    public void testReplace() throws Exception {
+
+        Painting p1 = context.newObject(Painting.class);
+        p1.setPaintingTitle("xa");
+
+        Gallery g1 = context.newObject(Gallery.class);
+        g1.setGalleryName("yTW");
+
+        p1.setToGallery(g1);
+
+        context.commitChanges();
+        ObjectContext context2 = runtime.newContext();
+
+        // test database data
+        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
+                Painting.class));
+        Gallery g21 = p2.getToGallery();
+        assertNotNull(g21);
+        assertEquals("yTW", g21.getGalleryName());
+        assertEquals(1, g21.getPaintingArray().size());
+        assertSame(p2, g21.getPaintingArray().get(0));
+
+        Gallery g22 = context2.newObject(Gallery.class);
+        g22.setGalleryName("rE");
+        p2.setToGallery(g22);
+
+        // test before save
+        assertEquals(0, g21.getPaintingArray().size());
+        assertEquals(1, g22.getPaintingArray().size());
+        assertSame(p2, g22.getPaintingArray().get(0));
+
+        // do save II
+        context2.commitChanges();
+
+        ObjectContext context3 = runtime.newContext();
+
+        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
+                Painting.class));
+        Gallery g3 = p3.getToGallery();
+        assertNotNull(g3);
+        assertEquals("rE", g3.getGalleryName());
+        assertEquals(1, g3.getPaintingArray().size());
+        assertSame(p3, g3.getPaintingArray().get(0));
+    }
+
+    public void testSavedAdd() throws Exception {
+        Painting p1 = context.newObject(Painting.class);
+        p1.setPaintingTitle("xa");
+
+        assertTrue(context.hasChanges());
+
+        // do save
+        context.commitChanges();
+        ObjectContext context2 = runtime.newContext();
+
+        // test database data
+        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
+                Painting.class));
+        assertNull(p2.getToGallery());
+
+        Gallery g2 = context2.newObject(Gallery.class);
+        g2.setGalleryName("rE");
+
+        p2.setToGallery(g2);
+
+        // test before save
+        assertEquals(1, g2.getPaintingArray().size());
+        assertSame(p2, g2.getPaintingArray().get(0));
+
+        // do save II
+        context2.commitChanges();
+        ObjectContext context3 = runtime.newContext();
+
+        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
+                Painting.class));
+        Gallery g3 = p3.getToGallery();
+        assertNotNull(g3);
+        assertEquals("rE", g3.getGalleryName());
+        assertEquals(1, g3.getPaintingArray().size());
+        assertSame(p3, g3.getPaintingArray().get(0));
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevIT.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevIT.java
new file mode 100644
index 0000000..27a2298
--- /dev/null
+++ b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevIT.java
@@ -0,0 +1,56 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+
+package org.apache.cayenne;
+
+import org.apache.cayenne.di.Inject;
+import org.apache.cayenne.testdo.testmap.Artist;
+import org.apache.cayenne.testdo.testmap.Painting1;
+import org.apache.cayenne.unit.di.server.ServerCase;
+import org.apache.cayenne.unit.di.server.UseServerRuntime;
+
+@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
+public class CDOMany2OneNoRevIT extends ServerCase {
+
+    @Inject
+    private ObjectContext context;
+
+    public void testNewAdd() throws Exception {
+
+        Artist a1 = context.newObject(Artist.class);
+        a1.setArtistName("a");
+        Painting1 p1 = context.newObject(Painting1.class);
+        p1.setPaintingTitle("p");
+
+        // TESTING THIS
+        p1.setToArtist(a1);
+
+        assertSame(a1, p1.getToArtist());
+
+        context.commitChanges();
+        ObjectId aid = a1.getObjectId();
+        ObjectId pid = p1.getObjectId();
+        context.invalidateObjects(a1, p1);
+
+        Painting1 p2 = (Painting1) Cayenne.objectForPK(context, pid);
+        Artist a2 = p2.getToArtist();
+        assertNotNull(a2);
+        assertEquals(aid, a2.getObjectId());
+    }
+}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevTest.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevTest.java
deleted file mode 100644
index bdbacea..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneNoRevTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-
-package org.apache.cayenne;
-
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.Painting1;
-import org.apache.cayenne.unit.di.server.ServerCase;
-import org.apache.cayenne.unit.di.server.UseServerRuntime;
-
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
-public class CDOMany2OneNoRevTest extends ServerCase {
-
-    @Inject
-    private ObjectContext context;
-
-    public void testNewAdd() throws Exception {
-
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("a");
-        Painting1 p1 = context.newObject(Painting1.class);
-        p1.setPaintingTitle("p");
-
-        // TESTING THIS
-        p1.setToArtist(a1);
-
-        assertSame(a1, p1.getToArtist());
-
-        context.commitChanges();
-        ObjectId aid = a1.getObjectId();
-        ObjectId pid = p1.getObjectId();
-        context.invalidateObjects(a1, p1);
-
-        Painting1 p2 = (Painting1) Cayenne.objectForPK(context, pid);
-        Artist a2 = p2.getToArtist();
-        assertNotNull(a2);
-        assertEquals(aid, a2.getObjectId());
-    }
-}

http://git-wip-us.apache.org/repos/asf/cayenne/blob/e42c376c/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneTest.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneTest.java b/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneTest.java
deleted file mode 100644
index 1333bd1..0000000
--- a/cayenne-server/src/test/java/org/apache/cayenne/CDOMany2OneTest.java
+++ /dev/null
@@ -1,325 +0,0 @@
-/*****************************************************************
- *   Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- ****************************************************************/
-
-package org.apache.cayenne;
-
-import java.sql.Types;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cayenne.configuration.server.ServerRuntime;
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.exp.Expression;
-import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.query.CapsStrategy;
-import org.apache.cayenne.query.SQLTemplate;
-import org.apache.cayenne.query.SelectQuery;
-import org.apache.cayenne.test.jdbc.DBHelper;
-import org.apache.cayenne.test.jdbc.TableHelper;
-import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.Gallery;
-import org.apache.cayenne.testdo.testmap.Painting;
-import org.apache.cayenne.testdo.testmap.ROPainting;
-import org.apache.cayenne.unit.di.server.ServerCase;
-import org.apache.cayenne.unit.di.server.UseServerRuntime;
-
-@UseServerRuntime(ServerCase.TESTMAP_PROJECT)
-public class CDOMany2OneTest extends ServerCase {
-
-    @Inject
-    private ServerRuntime runtime;
-
-    @Inject
-    private ObjectContext context;
-
-    @Inject
-    private DBHelper dbHelper;
-
-    protected TableHelper tArtist;
-    protected TableHelper tPainting;
-    protected TableHelper tGallery;
-
-    @Override
-    protected void setUpAfterInjection() throws Exception {
-        dbHelper.deleteAll("PAINTING_INFO");
-        dbHelper.deleteAll("PAINTING");
-        dbHelper.deleteAll("ARTIST_EXHIBIT");
-        dbHelper.deleteAll("ARTIST_GROUP");
-        dbHelper.deleteAll("ARTIST");
-        dbHelper.deleteAll("EXHIBIT");
-        dbHelper.deleteAll("GALLERY");
-
-        tArtist = new TableHelper(dbHelper, "ARTIST");
-        tArtist.setColumns("ARTIST_ID", "ARTIST_NAME");
-
-        tPainting = new TableHelper(dbHelper, "PAINTING");
-        tPainting
-                .setColumns("PAINTING_ID", "PAINTING_TITLE", "ARTIST_ID", "GALLERY_ID")
-                .setColumnTypes(Types.INTEGER, Types.VARCHAR, Types.BIGINT, Types.INTEGER);
-
-        tGallery = new TableHelper(dbHelper, "GALLERY");
-        tGallery.setColumns("GALLERY_ID", "GALLERY_NAME");
-    }
-
-    private void createArtistWithPaintingDataSet() throws Exception {
-        tArtist.insert(8, "aX");
-        tPainting.insert(6, "pW", 8, null);
-    }
-
-    private void createArtistWithPaintingsInGalleryDataSet() throws Exception {
-        tArtist.insert(8, "aX");
-        tGallery.insert(11, "Ge");
-        tPainting.insert(6, "pW1", 8, 11);
-        tPainting.insert(7, "pW2", 8, 11);
-
-    }
-
-    public void testMultipleToOneDeletion() throws Exception {
-
-        // was a problem per CAY-901
-
-        Painting p = context.newObject(Painting.class);
-        p.setPaintingTitle("P1");
-
-        Artist a = context.newObject(Artist.class);
-        a.setArtistName("A1");
-
-        Gallery g = context.newObject(Gallery.class);
-        g.setGalleryName("G1");
-
-        p.setToArtist(a);
-        p.setToGallery(g);
-        context.commitChanges();
-
-        p.setToArtist(null);
-        p.setToGallery(null);
-
-        context.commitChanges();
-
-        SQLTemplate q = new SQLTemplate(Painting.class, "SELECT * from PAINTING");
-        q.setColumnNamesCapitalization(CapsStrategy.UPPER);
-        q.setFetchingDataRows(true);
-
-        Map<String, ?> row = (Map<String, ?>) Cayenne.objectForQuery(context, q);
-        assertEquals("P1", row.get("PAINTING_TITLE"));
-        assertEquals(null, row.get("ARTIST_ID"));
-        assertEquals(null, row.get("GALLERY_ID"));
-    }
-
-    public void testReadRO1() throws Exception {
-
-        createArtistWithPaintingDataSet();
-
-        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
-
-        Expression e = ExpressionFactory.matchExp(ROPainting.TO_ARTIST_PROPERTY, a1);
-        SelectQuery q = new SelectQuery(ROPainting.class, e);
-
-        List<ROPainting> paints = context.performQuery(q);
-        assertEquals(1, paints.size());
-
-        ROPainting rop1 = paints.get(0);
-        assertSame(a1, rop1.getToArtist());
-    }
-
-    public void testReadRO2() throws Exception {
-
-        createArtistWithPaintingDataSet();
-
-        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
-
-        Expression e = ExpressionFactory.matchExp(ROPainting.TO_ARTIST_PROPERTY, a1);
-        SelectQuery q = new SelectQuery(ROPainting.class, e);
-
-        List<ROPainting> paints = context.performQuery(q);
-        assertEquals(1, paints.size());
-
-        ROPainting rop1 = paints.get(0);
-        assertNotNull(rop1.getToArtist());
-
-        // trigger fetch
-        rop1.getToArtist().getArtistName();
-        assertEquals(PersistenceState.COMMITTED, rop1.getToArtist().getPersistenceState());
-    }
-
-    public void testSelectViaRelationship() throws Exception {
-
-        createArtistWithPaintingDataSet();
-        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
-        Painting p1 = Cayenne.objectForPK(context, Painting.class, 6);
-
-        Expression e = ExpressionFactory.matchExp(Painting.TO_ARTIST_PROPERTY, a1);
-        SelectQuery q = new SelectQuery(Painting.class, e);
-
-        List<Painting> paints = context.performQuery(q);
-        assertEquals(1, paints.size());
-        assertSame(p1, paints.get(0));
-    }
-
-    public void testSelectViaMultiRelationship() throws Exception {
-
-        createArtistWithPaintingsInGalleryDataSet();
-
-        Artist a1 = Cayenne.objectForPK(context, Artist.class, 8);
-        Gallery g1 = Cayenne.objectForPK(context, Gallery.class, 11);
-
-        Expression e = ExpressionFactory.matchExp("paintingArray.toGallery", g1);
-        SelectQuery q = new SelectQuery("Artist", e);
-
-        List<Artist> artists = context.performQuery(q);
-        assertEquals(1, artists.size());
-        assertSame(a1, artists.get(0));
-    }
-
-    public void testNewAdd() throws Exception {
-        Artist a1 = context.newObject(Artist.class);
-        a1.setArtistName("bL");
-
-        Painting p1 = context.newObject(Painting.class);
-        p1.setPaintingTitle("xa");
-
-        p1.setToArtist(a1);
-
-        assertSame(a1, p1.getToArtist());
-        assertEquals(1, a1.getPaintingArray().size());
-        assertSame(p1, a1.getPaintingArray().get(0));
-
-        context.commitChanges();
-
-        assertEquals(Cayenne.longPKForObject(a1), tArtist.getLong("ARTIST_ID"));
-        assertEquals(Cayenne.longPKForObject(a1), tPainting.getLong("ARTIST_ID"));
-    }
-
-    public void testRemove() throws Exception {
-        Painting p1 = context.newObject(Painting.class);
-        p1.setPaintingTitle("xa");
-
-        Gallery g1 = context.newObject(Gallery.class);
-        g1.setGalleryName("yT");
-
-        p1.setToGallery(g1);
-
-        // do save
-        context.commitChanges();
-
-        ObjectContext context2 = runtime.newContext();
-
-        // test database data
-        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
-                Painting.class));
-        Gallery g2 = p2.getToGallery();
-
-        p2.setToGallery(null);
-
-        // test before save
-        assertEquals(0, g2.getPaintingArray().size());
-        assertNull(p2.getToGallery());
-
-        // do save II
-        context2.commitChanges();
-
-        ObjectContext context3 = runtime.newContext();
-
-        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
-                Painting.class));
-        assertNull(p3.getToGallery());
-    }
-
-    public void testReplace() throws Exception {
-
-        Painting p1 = context.newObject(Painting.class);
-        p1.setPaintingTitle("xa");
-
-        Gallery g1 = context.newObject(Gallery.class);
-        g1.setGalleryName("yTW");
-
-        p1.setToGallery(g1);
-
-        context.commitChanges();
-        ObjectContext context2 = runtime.newContext();
-
-        // test database data
-        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
-                Painting.class));
-        Gallery g21 = p2.getToGallery();
-        assertNotNull(g21);
-        assertEquals("yTW", g21.getGalleryName());
-        assertEquals(1, g21.getPaintingArray().size());
-        assertSame(p2, g21.getPaintingArray().get(0));
-
-        Gallery g22 = context2.newObject(Gallery.class);
-        g22.setGalleryName("rE");
-        p2.setToGallery(g22);
-
-        // test before save
-        assertEquals(0, g21.getPaintingArray().size());
-        assertEquals(1, g22.getPaintingArray().size());
-        assertSame(p2, g22.getPaintingArray().get(0));
-
-        // do save II
-        context2.commitChanges();
-
-        ObjectContext context3 = runtime.newContext();
-
-        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
-                Painting.class));
-        Gallery g3 = p3.getToGallery();
-        assertNotNull(g3);
-        assertEquals("rE", g3.getGalleryName());
-        assertEquals(1, g3.getPaintingArray().size());
-        assertSame(p3, g3.getPaintingArray().get(0));
-    }
-
-    public void testSavedAdd() throws Exception {
-        Painting p1 = context.newObject(Painting.class);
-        p1.setPaintingTitle("xa");
-
-        assertTrue(context.hasChanges());
-
-        // do save
-        context.commitChanges();
-        ObjectContext context2 = runtime.newContext();
-
-        // test database data
-        Painting p2 = (Painting) Cayenne.objectForQuery(context2, new SelectQuery(
-                Painting.class));
-        assertNull(p2.getToGallery());
-
-        Gallery g2 = context2.newObject(Gallery.class);
-        g2.setGalleryName("rE");
-
-        p2.setToGallery(g2);
-
-        // test before save
-        assertEquals(1, g2.getPaintingArray().size());
-        assertSame(p2, g2.getPaintingArray().get(0));
-
-        // do save II
-        context2.commitChanges();
-        ObjectContext context3 = runtime.newContext();
-
-        Painting p3 = (Painting) Cayenne.objectForQuery(context3, new SelectQuery(
-                Painting.class));
-        Gallery g3 = p3.getToGallery();
-        assertNotNull(g3);
-        assertEquals("rE", g3.getGalleryName());
-        assertEquals(1, g3.getPaintingArray().size());
-        assertSame(p3, g3.getPaintingArray().get(0));
-    }
-}


Mime
View raw message