diff options
Diffstat (limited to 'jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java')
-rw-r--r-- | jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java index baab3008c5..c11dc3f93f 100644 --- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java +++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/java/GenericJavaPersistentAttribute2_0Tests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Oracle. All rights reserved. + * Copyright (c) 2009, 2010 Oracle. All rights reserved. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0, which accompanies this distribution * and is available at http://www.eclipse.org/legal/epl-v10.html. @@ -137,20 +137,25 @@ public class GenericJavaPersistentAttribute2_0Tests extends Generic2_0ContextMod assertEquals(id.getMappingKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY); id.getResourcePersistentAttribute().addAnnotation(JPA.ONE_TO_ONE); + getJpaProject().synchronizeContextModel(); assertEquals(id.getMappingKey(), MappingKeys.ONE_TO_ONE_ATTRIBUTE_MAPPING_KEY); assertNotNull(id.getResourcePersistentAttribute().getAnnotation(JPA.ID)); id.getResourcePersistentAttribute().removeAnnotation(JPA.ONE_TO_ONE); + getJpaProject().synchronizeContextModel(); assertEquals(id.getMappingKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY); id.getResourcePersistentAttribute().addAnnotation(JPA.MANY_TO_ONE); + getJpaProject().synchronizeContextModel(); assertEquals(id.getMappingKey(), MappingKeys.MANY_TO_ONE_ATTRIBUTE_MAPPING_KEY); assertNotNull(id.getResourcePersistentAttribute().getAnnotation(JPA.ID)); id.getResourcePersistentAttribute().removeAnnotation(JPA.MANY_TO_ONE); + getJpaProject().synchronizeContextModel(); assertEquals(id.getMappingKey(), MappingKeys.ID_ATTRIBUTE_MAPPING_KEY); id.getResourcePersistentAttribute().setPrimaryAnnotation(null, EmptyIterable.<String>instance()); + getJpaProject().synchronizeContextModel(); assertEquals(id.getMappingKey(), MappingKeys.BASIC_ATTRIBUTE_MAPPING_KEY); } } |