From 8b706fb3d66838e9e525f9db7053aec646c07803 Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Fri, 30 Nov 2012 16:12:14 -0800 Subject: [PATCH] HHH-7843 : Add support for one-to-one to new metamodel --- .../hbm/AbstractToOneAttributeSourceImpl.java | 2 +- .../test/lazyonetoone/LazyOneToOneTest.java | 1 - .../readonly/ReadOnlySessionLazyNonLazyTest.java | 16 ++-------------- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/AbstractToOneAttributeSourceImpl.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/AbstractToOneAttributeSourceImpl.java index f3bce69b1d..8c95b2d3cd 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/AbstractToOneAttributeSourceImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/source/hbm/AbstractToOneAttributeSourceImpl.java @@ -114,7 +114,7 @@ public abstract class AbstractToOneAttributeSourceImpl extends AbstractHbmSource else if ( "extra".equals( lazySelection ) ) { return FetchTiming.EXTRA_DELAYED; } - else if ( "true".equals( lazySelection ) || "proxy".equals( lazySelection ) ) { + else if ( "true".equals( lazySelection ) || "proxy".equals( lazySelection ) || "no-proxy".equals( lazySelection ) ) { return FetchTiming.DELAYED; } else if ( "false".equals( lazySelection ) ) { diff --git a/hibernate-core/src/test/java/org/hibernate/test/lazyonetoone/LazyOneToOneTest.java b/hibernate-core/src/test/java/org/hibernate/test/lazyonetoone/LazyOneToOneTest.java index c18e858d54..4967026704 100755 --- a/hibernate-core/src/test/java/org/hibernate/test/lazyonetoone/LazyOneToOneTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/lazyonetoone/LazyOneToOneTest.java @@ -48,7 +48,6 @@ import static org.junit.Assert.assertTrue; condition = LazyOneToOneTest.DomainClassesInstrumentedMatcher.class, message = "Test domain classes were not instrumented" ) -@FailureExpectedWithNewMetamodel public class LazyOneToOneTest extends BaseCoreFunctionalTestCase { @Override public String[] getMappings() { diff --git a/hibernate-core/src/test/java/org/hibernate/test/readonly/ReadOnlySessionLazyNonLazyTest.java b/hibernate-core/src/test/java/org/hibernate/test/readonly/ReadOnlySessionLazyNonLazyTest.java index a67cace270..d1ef670f33 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/readonly/ReadOnlySessionLazyNonLazyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/test/readonly/ReadOnlySessionLazyNonLazyTest.java @@ -75,7 +75,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { @Test @SuppressWarnings( {"unchecked"}) - @FailureExpectedWithNewMetamodel public void testExistingModifiableAfterSetSessionReadOnly() { Container cOrig = createContainer(); Set expectedInitializedObjects = new HashSet( @@ -170,7 +169,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { s.close(); } - @FailureExpectedWithNewMetamodel @Test @SuppressWarnings( {"unchecked"}) public void testExistingReadOnlyAfterSetSessionModifiable() { @@ -260,7 +258,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { s.close(); } - @FailureExpectedWithNewMetamodel @Test @SuppressWarnings( {"unchecked"}) public void testExistingReadOnlyAfterSetSessionModifiableExisting() { @@ -351,7 +348,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testExistingReadOnlyAfterSetSessionModifiableExistingEntityReadOnly() { @@ -445,7 +441,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testExistingReadOnlyAfterSetSessionModifiableProxyExisting() { @@ -536,7 +531,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testExistingReadOnlyAfterSetSessionModifiableExistingProxyReadOnly() { @@ -629,7 +623,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultModifiableWithReadOnlyQueryForEntity() { @@ -716,7 +709,7 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel + @SuppressWarnings( {"unchecked"}) @Test public void testDefaultReadOnlyWithModifiableQueryForEntity() { @@ -791,7 +784,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultReadOnlyWithQueryForEntity() { @@ -879,7 +871,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultModifiableWithQueryForEntity() { @@ -1001,7 +992,7 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel + @Test @SuppressWarnings( {"unchecked"}) public void testDefaultReadOnlyWithModifiableFilterCollectionEntities() { @@ -1093,7 +1084,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultModifiableWithReadOnlyFilterCollectionEntities() { @@ -1171,7 +1161,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultReadOnlyWithFilterCollectionEntities() { @@ -1260,7 +1249,6 @@ public class ReadOnlySessionLazyNonLazyTest extends AbstractReadOnlyTest { t.commit(); s.close(); } - @FailureExpectedWithNewMetamodel @SuppressWarnings( {"unchecked"}) @Test public void testDefaultModifiableWithFilterCollectionEntities() {