Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jpa
diff options
context:
space:
mode:
authorkmoore2010-05-11 14:22:04 +0000
committerkmoore2010-05-11 14:22:04 +0000
commitd20617328d008249c5a720887d9ccb51d28992a7 (patch)
treed68946b3f131c2cde261243a3f22786359387c72 /jpa
parent994cb1943a4f33ea12c63213d41986a7529810c9 (diff)
downloadwebtools.dali-d20617328d008249c5a720887d9ccb51d28992a7.tar.gz
webtools.dali-d20617328d008249c5a720887d9ccb51d28992a7.tar.xz
webtools.dali-d20617328d008249c5a720887d9ccb51d28992a7.zip
312096 - fixed index out of bounds exception adding attributes
Diffstat (limited to 'jpa')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/GenericOrmPersistentAttributeTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddedIdMappingTests.java7
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmGeneratedValueTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmIdMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmManyToOneMappingTests.java3
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmOneToOneMappingTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmTransientMappingTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmVersionMappingTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0Tests.java12
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmManyToManyMapping2_0Tests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java8
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentType2_0Tests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java8
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java20
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java10
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java4
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java6
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java2
25 files changed, 87 insertions, 84 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
index 71b2ad97e5..cf52e6c52a 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jpa1/context/orm/GenericOrmPersistentType.java
@@ -558,10 +558,6 @@ public class GenericOrmPersistentType
this.removeItemFromList(virtualAttribute, this.virtualAttributes, VIRTUAL_ATTRIBUTES_LIST);
}
- protected void moveVirtualAttribute_(int index, OrmPersistentAttribute virtualAttribute) {
- this.moveItemInList(index, this.virtualAttributes.indexOf(virtualAttribute), this.virtualAttributes, VIRTUAL_ATTRIBUTES_LIST);
- }
-
public boolean containsVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute) {
return this.virtualAttributes.contains(ormPersistentAttribute);
}
@@ -610,7 +606,6 @@ public class GenericOrmPersistentType
if (javaPersistentAttribute.getResourcePersistentAttribute() == javaResourceAttribute) {
if (this.valuesAreEqual(contextAttribute.getMappingKey(), javaAttributeMapping.getKey())) {
//the mapping key would change if metaDataComplete flag changes, rebuild the orm attribute
- this.moveVirtualAttribute_(resourceIndex, contextAttribute);
contextAttributesToRemove.remove(contextAttribute);
contextAttributesToUpdate.add(contextAttribute);
contextAttributeFound = true;
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/GenericOrmPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/GenericOrmPersistentAttributeTests.java
index 7767b3b873..26c540b144 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/GenericOrmPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/GenericOrmPersistentAttributeTests.java
@@ -232,7 +232,7 @@ public class GenericOrmPersistentAttributeTests extends ContextModelTestCase
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals("id", ormPersistentAttribute.getName());
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
assertEquals("id", ((BasicMapping) ormPersistentAttribute.getMapping()).getColumn().getName());
@@ -249,7 +249,7 @@ public class GenericOrmPersistentAttributeTests extends ContextModelTestCase
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals("address", ormPersistentAttribute.getName());
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddedIdMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddedIdMappingTests.java
index 88524737ab..e2ce25fbb1 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddedIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmEmbeddedIdMappingTests.java
@@ -815,10 +815,11 @@ public class OrmEmbeddedIdMappingTests extends ContextModelTestCase
getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(3, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
-
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
+ assertTrue(ormPersistentAttribute.isVirtual());
+
//will be an OrmEmbeddedMapping instead of OrmEmbeddedIdMapping since that is the default
- OrmEmbeddedMapping ormEmbeddedMapping = (OrmEmbeddedMapping) ormPersistentAttribute.getMapping();
+ OrmEmbeddedMapping ormEmbeddedMapping = (OrmEmbeddedMapping) ormPersistentAttribute.getMapping();
assertEquals("address", ormEmbeddedMapping.getName());
//TODO
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmGeneratedValueTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmGeneratedValueTests.java
index 7d0fd95fc2..bd3ccc87ed 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmGeneratedValueTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmGeneratedValueTests.java
@@ -125,7 +125,7 @@ import org.eclipse.jpt.utility.internal.iterators.ArrayIterator;
assertEquals(GenerationType.SEQUENCE, javaGeneratedValue.getSpecifiedStrategy());
ormIdAttribute.makeVirtual();
- ormIdAttribute = ormPersistentType.virtualAttributes().next();
+ ormIdAttribute = ormPersistentType.getAttributeNamed("id");
ormIdMapping = (IdMapping) ormIdAttribute.getMapping();
assertEquals("Foo", ormIdMapping.getGeneratedValue().getSpecifiedGenerator());
assertEquals(GenerationType.SEQUENCE, ormIdMapping.getGeneratedValue().getSpecifiedStrategy());
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmIdMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmIdMappingTests.java
index 5598c830ed..15a791252d 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmIdMappingTests.java
@@ -501,14 +501,15 @@ public class OrmIdMappingTests extends ContextModelTestCase
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(2, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
ormPersistentAttribute.makeSpecified(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY);
- ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
OrmIdMapping ormIdMapping = (OrmIdMapping) ormPersistentAttribute.getMapping();
+ assertFalse(ormPersistentAttribute.isVirtual());
assertEquals("id", ormIdMapping.getName());
assertEquals(Converter.NO_CONVERTER, ormIdMapping.getConverter().getType());
assertNull(ormIdMapping.getGeneratedValue());
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmManyToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmManyToOneMappingTests.java
index 09fa209f52..06f0599619 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmManyToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmManyToOneMappingTests.java
@@ -521,9 +521,10 @@ public class OrmManyToOneMappingTests extends ContextModelTestCase
getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(3, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
+ assertTrue(ormPersistentAttribute.isVirtual());
ormPersistentAttribute.makeSpecified(MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY);
ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmOneToOneMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmOneToOneMappingTests.java
index 066c1eeb4e..1e31c7b0f5 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmOneToOneMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmOneToOneMappingTests.java
@@ -698,10 +698,11 @@ public class OrmOneToOneMappingTests extends ContextModelTestCase
getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(3, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
-
+ assertTrue(ormPersistentAttribute.isVirtual());
+
ormPersistentAttribute.makeSpecified(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY);
ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmTransientMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmTransientMappingTests.java
index e41cd6d9ea..0b49ee047c 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmTransientMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmTransientMappingTests.java
@@ -141,15 +141,17 @@ public class OrmTransientMappingTests extends ContextModelTestCase
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(2, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
+ assertTrue(ormPersistentAttribute.isVirtual());
ormPersistentAttribute.makeSpecified(MappingKeys.TRANSIENT_ATTRIBUTE_MAPPING_KEY);
- ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
OrmTransientMapping ormTransientMapping = (OrmTransientMapping) ormPersistentAttribute.getMapping();
assertEquals("id", ormTransientMapping.getName());
+ assertFalse(ormPersistentAttribute.isVirtual());
}
public void testSpecifiedMapping() throws Exception {
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmVersionMappingTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmVersionMappingTests.java
index 5ec3e74192..bab7a548df 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmVersionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/orm/OrmVersionMappingTests.java
@@ -249,15 +249,17 @@ public class OrmVersionMappingTests extends ContextModelTestCase
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(2, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
+ assertTrue(ormPersistentAttribute.isVirtual());
ormPersistentAttribute.makeSpecified(MappingKeys.VERSION_ATTRIBUTE_MAPPING_KEY);
- ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
+ ormPersistentAttribute= ormPersistentType.getAttributeNamed("id");
OrmVersionMapping ormVersionMapping = (OrmVersionMapping) ormPersistentAttribute.getMapping();
assertEquals("id", ormVersionMapping.getName());
+ assertFalse(ormPersistentAttribute.isVirtual());
assertEquals(Converter.NO_CONVERTER, ormVersionMapping.getConverter().getType());
OrmColumn ormColumn = ormVersionMapping.getColumn();
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0Tests.java
index 384958d9cb..676d05545e 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmElementCollectionMapping2_0Tests.java
@@ -349,12 +349,12 @@ public class GenericOrmElementCollectionMapping2_0Tests extends Generic2_0Contex
getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(3, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
ormPersistentAttribute.makeSpecified(MappingKeys2_0.ELEMENT_COLLECTION_ATTRIBUTE_MAPPING_KEY);
- ormPersistentAttribute= ormPersistentType.specifiedAttributes().next();
+ ormPersistentAttribute = ormPersistentType.specifiedAttributes().next();
OrmElementCollectionMapping2_0 ormElementCollectionMapping = (OrmElementCollectionMapping2_0) ormPersistentAttribute.getMapping();
assertEquals("address", ormElementCollectionMapping.getName());
@@ -949,7 +949,7 @@ public class GenericOrmElementCollectionMapping2_0Tests extends Generic2_0Contex
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
//virtual attrubte in orm.xml, java attribute has no value Column annotation
- OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
OrmElementCollectionMapping2_0 addressesVirtualMapping = (OrmElementCollectionMapping2_0) addressesPersistentAttribute.getMapping();
OrmColumn ormColumn = addressesVirtualMapping.getValueColumn();
assertEquals("addresses", ormColumn.getSpecifiedName());
@@ -990,7 +990,7 @@ public class GenericOrmElementCollectionMapping2_0Tests extends Generic2_0Contex
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
@@ -1298,7 +1298,7 @@ public class GenericOrmElementCollectionMapping2_0Tests extends Generic2_0Contex
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
//virtual attribute in orm.xml, java attribute has no value Column annotation
- OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
OrmElementCollectionMapping2_0 addressesVirtualMapping = (OrmElementCollectionMapping2_0) addressesPersistentAttribute.getMapping();
Column ormColumn = addressesVirtualMapping.getMapKeyColumn();
assertEquals("addresses_KEY", ormColumn.getSpecifiedName());
@@ -1339,7 +1339,7 @@ public class GenericOrmElementCollectionMapping2_0Tests extends Generic2_0Contex
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmManyToManyMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmManyToManyMapping2_0Tests.java
index a4c658c9ed..ae4d96a26e 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmManyToManyMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmManyToManyMapping2_0Tests.java
@@ -722,7 +722,7 @@ public class GenericOrmManyToManyMapping2_0Tests
getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
//virtual attribute in orm.xml, java attribute has no value Column annotation
- OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
OrmManyToManyMapping2_0 addressesVirtualMapping = (OrmManyToManyMapping2_0) addressesPersistentAttribute.getMapping();
Column ormColumn = addressesVirtualMapping.getMapKeyColumn();
assertEquals("addresses_KEY", ormColumn.getSpecifiedName());
@@ -763,7 +763,7 @@ public class GenericOrmManyToManyMapping2_0Tests
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
index 029b631e48..9e1e1edd01 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmOneToManyMapping2_0Tests.java
@@ -744,7 +744,7 @@ public class GenericOrmOneToManyMapping2_0Tests
getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
//virtual attribute in orm.xml, java attribute has no value Column annotation
- OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
OrmOneToManyMapping2_0 addressesVirtualMapping = (OrmOneToManyMapping2_0) addressesPersistentAttribute.getMapping();
Column ormColumn = addressesVirtualMapping.getMapKeyColumn();
assertEquals("addresses_KEY", ormColumn.getSpecifiedName());
@@ -785,7 +785,7 @@ public class GenericOrmOneToManyMapping2_0Tests
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
index ccad588b76..c2323b202e 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentAttribute2_0Tests.java
@@ -302,7 +302,7 @@ public class GenericOrmPersistentAttribute2_0Tests
createTestEntityIdMapping();
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals("id", ormPersistentAttribute.getName());
assertEquals(MappingKeys.ID_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
assertEquals("FOO", ((IdMapping) ormPersistentAttribute.getMapping()).getColumn().getName());
@@ -310,7 +310,7 @@ public class GenericOrmPersistentAttribute2_0Tests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals("id", ormPersistentAttribute.getName());
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
assertEquals("id", ((BasicMapping) ormPersistentAttribute.getMapping()).getColumn().getName());
@@ -320,14 +320,14 @@ public class GenericOrmPersistentAttribute2_0Tests
createTestEntityOneToOneMapping();
OrmPersistentType ormPersistentType = getEntityMappings().addPersistentType(MappingKeys.ENTITY_TYPE_MAPPING_KEY, FULLY_QUALIFIED_TYPE_NAME);
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals("address", ormPersistentAttribute.getName());
assertEquals(MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals("address", ormPersistentAttribute.getName());
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentType2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentType2_0Tests.java
index a59f91d50a..4167fa07b9 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentType2_0Tests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/orm/GenericOrmPersistentType2_0Tests.java
@@ -170,12 +170,12 @@ public class GenericOrmPersistentType2_0Tests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
virtualAttributes = ormPersistentType.virtualAttributes();
ormPersistentAttribute = virtualAttributes.next();
- assertEquals("id", ormPersistentAttribute.getName());
+ assertEquals("name", ormPersistentAttribute.getName());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
ormPersistentAttribute = virtualAttributes.next();
- assertEquals("name", ormPersistentAttribute.getName());
+ assertEquals("id", ormPersistentAttribute.getName());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
assertFalse(virtualAttributes.hasNext());
@@ -238,11 +238,11 @@ public class GenericOrmPersistentType2_0Tests
virtualAttributes = ormPersistentType.virtualAttributes();
ormPersistentAttribute = virtualAttributes.next();
- assertEquals("id", ormPersistentAttribute.getName());
+ assertEquals("name", ormPersistentAttribute.getName());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
ormPersistentAttribute = virtualAttributes.next();
- assertEquals("name", ormPersistentAttribute.getName());
+ assertEquals("id", ormPersistentAttribute.getName());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
assertFalse(virtualAttributes.hasNext());
@@ -256,7 +256,7 @@ public class GenericOrmPersistentType2_0Tests
ormPersistentType.virtualAttributes().next().makeSpecified();
virtualAttributes = ormPersistentType.virtualAttributes();
ormPersistentAttribute = virtualAttributes.next();
- assertEquals("name", ormPersistentAttribute.getName());
+ assertEquals("id", ormPersistentAttribute.getName());
assertEquals(AccessType.FIELD, ormPersistentAttribute.getAccess());
assertFalse(virtualAttributes.hasNext());
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
index 11e061b6cb..db8a63479d 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmBasicMappingTests.java
@@ -139,7 +139,7 @@ public class EclipseLinkOrmBasicMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceBasic.getMutable());
@@ -150,7 +150,7 @@ public class EclipseLinkOrmBasicMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceBasic.getMutable());
assertTrue(contextBasic.getMutable().isDefaultMutable());
@@ -238,7 +238,7 @@ public class EclipseLinkOrmBasicMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceBasic.getMutable());
@@ -249,7 +249,7 @@ public class EclipseLinkOrmBasicMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceBasic.getMutable());
assertFalse(contextBasic.getMutable().isDefaultMutable());
@@ -337,7 +337,7 @@ public class EclipseLinkOrmBasicMappingTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER, ormBasicMapping.getConverter().getType());
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
index 7964dc19be..1a16fd135d 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmConverterTests.java
@@ -86,7 +86,7 @@ public class EclipseLinkOrmConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (OrmEclipseLinkCustomConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -97,7 +97,7 @@ public class EclipseLinkOrmConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getConverterClass());
@@ -153,7 +153,7 @@ public class EclipseLinkOrmConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (OrmEclipseLinkCustomConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -164,7 +164,7 @@ public class EclipseLinkOrmConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getName());
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
index 8e1c73b2e3..adfc494486 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmIdMappingTests.java
@@ -138,7 +138,7 @@ public class EclipseLinkOrmIdMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
contextId = (OrmEclipseLinkIdMapping) ormPersistentAttribute.getMapping();
assertNull(resourceId.getMutable());
@@ -149,7 +149,7 @@ public class EclipseLinkOrmIdMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
OrmEclipseLinkBasicMapping contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceId.getMutable());
assertTrue(contextBasic.getMutable().isDefaultMutable());
@@ -237,7 +237,7 @@ public class EclipseLinkOrmIdMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
contextId = (OrmEclipseLinkIdMapping) ormPersistentAttribute.getMapping();
assertNull(resourceId.getMutable());
@@ -248,7 +248,7 @@ public class EclipseLinkOrmIdMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
OrmEclipseLinkBasicMapping contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceId.getMutable());
assertFalse(contextBasic.getMutable().isDefaultMutable());
@@ -336,7 +336,7 @@ public class EclipseLinkOrmIdMappingTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormIdMapping = (OrmIdMapping) ormPersistentAttribute.getMapping();
assertEquals(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER, ormIdMapping.getConverter().getType());
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
index cad90af667..21cab6f54e 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmObjectTypeConverterTests.java
@@ -111,7 +111,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkObjectTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -122,7 +122,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getDataType());
@@ -179,7 +179,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkObjectTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -190,7 +190,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getObjectType());
@@ -248,7 +248,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (OrmEclipseLinkObjectTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -261,7 +261,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getName());
@@ -318,7 +318,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkObjectTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -329,7 +329,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getDefaultObjectValue());
@@ -455,7 +455,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//remove orm attribute mapping, verify virtual mapping has conversion values from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkObjectTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -469,7 +469,7 @@ public class EclipseLinkOrmObjectTypeConverterTests
//set metadata-complete to true, verify virtual mapping ignores the conversion values from java
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(EclipseLinkConverter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
index 01aad180f2..42438946f7 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmPersistentAttributeTests.java
@@ -232,7 +232,7 @@ public class EclipseLinkOrmPersistentAttributeTests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals("id", ormPersistentAttribute.getName());
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
assertEquals("id", ((BasicMapping) ormPersistentAttribute.getMapping()).getColumn().getName());
@@ -249,7 +249,7 @@ public class EclipseLinkOrmPersistentAttributeTests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals("address", ormPersistentAttribute.getName());
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
index b2ffd93fa1..a4beaf0824 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmStructConverterTests.java
@@ -87,7 +87,7 @@ public class EclipseLinkOrmStructConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkStructConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -98,7 +98,7 @@ public class EclipseLinkOrmStructConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getConverterClass());
@@ -156,7 +156,7 @@ public class EclipseLinkOrmStructConverterTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (OrmEclipseLinkStructConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
index 0c9dec87be..5d3d3f85b0 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmTypeConverterTests.java
@@ -87,7 +87,7 @@ public class EclipseLinkOrmTypeConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -98,7 +98,7 @@ public class EclipseLinkOrmTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getDataType());
@@ -155,7 +155,7 @@ public class EclipseLinkOrmTypeConverterTests
//remove the specified persistent attribute, test virtual mapping
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (EclipseLinkTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
@@ -166,7 +166,7 @@ public class EclipseLinkOrmTypeConverterTests
//set metadata-complete, test virtual mapping
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
assertEquals(Converter.NO_CONVERTER, ormBasicMapping.getConverter().getType());
assertEquals("bar", javaConverter.getObjectType());
@@ -224,7 +224,7 @@ public class EclipseLinkOrmTypeConverterTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormBasicMapping = (OrmBasicMapping) ormPersistentAttribute.getMapping();
ormConverter = (OrmEclipseLinkTypeConverter) ((EclipseLinkConvert) ormBasicMapping.getConverter()).getConverter();
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
index b5de79e841..61e645dea6 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/orm/EclipseLinkOrmVersionMappingTests.java
@@ -138,7 +138,7 @@ public class EclipseLinkOrmVersionMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
contextVersion = (OrmEclipseLinkVersionMapping) ormPersistentAttribute.getMapping();
assertNull(resourceVersion.getMutable());
@@ -149,7 +149,7 @@ public class EclipseLinkOrmVersionMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
OrmEclipseLinkBasicMapping contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceVersion.getMutable());
assertTrue(contextBasic.getMutable().isDefaultMutable());
@@ -237,7 +237,7 @@ public class EclipseLinkOrmVersionMappingTests
// remove attribute from xml, test default mutable from java
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
contextVersion = (OrmEclipseLinkVersionMapping) ormPersistentAttribute.getMapping();
assertNull(resourceVersion.getMutable());
@@ -248,7 +248,7 @@ public class EclipseLinkOrmVersionMappingTests
// set metadata complete
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("myDate");
OrmEclipseLinkBasicMapping contextBasic = (OrmEclipseLinkBasicMapping) ormPersistentAttribute.getMapping();
assertNull(resourceVersion.getMutable());
assertFalse(contextBasic.getMutable().isDefaultMutable());
@@ -336,7 +336,7 @@ public class EclipseLinkOrmVersionMappingTests
ormPersistentType.removeSpecifiedAttribute(ormPersistentAttribute);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
ormVersionMapping = (OrmVersionMapping) ormPersistentAttribute.getMapping();
assertEquals(EclipseLinkConvert.ECLIPSE_LINK_CONVERTER, ormVersionMapping.getConverter().getType());
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
index 2155a3b2f5..d1637e7e80 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/orm/EclipseLink1_1OrmPersistentAttributeTests.java
@@ -249,7 +249,7 @@ public class EclipseLink1_1OrmPersistentAttributeTests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("id");
assertEquals("id", ormPersistentAttribute.getName());
assertEquals(MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
assertEquals("id", ((BasicMapping) ormPersistentAttribute.getMapping()).getColumn().getName());
@@ -266,7 +266,7 @@ public class EclipseLink1_1OrmPersistentAttributeTests
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals("address", ormPersistentAttribute.getName());
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
index c23b9d0d60..02d92877b8 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmElementCollectionMappingTests.java
@@ -336,7 +336,7 @@ public class EclipseLink2_0OrmElementCollectionMappingTests extends EclipseLink2
getEntityMappings().addPersistentType(MappingKeys.EMBEDDABLE_TYPE_MAPPING_KEY, PACKAGE_NAME + ".Address");
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
assertEquals(3, ormPersistentType.virtualAttributesSize());
- OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ OrmPersistentAttribute ormPersistentAttribute = ormPersistentType.getAttributeNamed("address");
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, ormPersistentAttribute.getMappingKey());
@@ -976,7 +976,7 @@ public class EclipseLink2_0OrmElementCollectionMappingTests extends EclipseLink2
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
@@ -1323,7 +1323,7 @@ public class EclipseLink2_0OrmElementCollectionMappingTests extends EclipseLink2
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//no longer an element collection mapping
assertEquals(MappingKeys.NULL_ATTRIBUTE_MAPPING_KEY, addressesPersistentAttribute.getMappingKey());
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
index 53c5b4fa6d..a02782afb9 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/orm/EclipseLink2_0OrmManyToManyMappingTests.java
@@ -763,7 +763,7 @@ public class EclipseLink2_0OrmManyToManyMappingTests
//set metadata-complete, orm.xml virtual column ignores java column annotation
ormPersistentType.getMapping().setSpecifiedMetadataComplete(Boolean.TRUE);
- addressesPersistentAttribute = ormPersistentType.virtualAttributes().next();
+ addressesPersistentAttribute = ormPersistentType.getAttributeNamed("addresses");
//becomes a 1-m by default
OrmOneToManyMapping2_0 addressesMapping = (OrmOneToManyMapping2_0) addressesPersistentAttribute.getMapping();
ormColumn = addressesMapping.getMapKeyColumn();

Back to the top