From 073bb53c8fdfc9f7bf27dd054136ae35945f83ce Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Thu, 18 Apr 2013 14:23:33 -0700 Subject: [PATCH] HHH-7841 - Redesign Loader --- .../jpa/graph/internal/advisor/AdviceHelper.java | 11 ++--------- .../test/graphs/BasicGraphLoadPlanAdviceTests.java | 7 +------ 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/graph/internal/advisor/AdviceHelper.java b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/graph/internal/advisor/AdviceHelper.java index f5e2d3a3a9..297912b513 100644 --- a/hibernate-entitymanager/src/main/java/org/hibernate/jpa/graph/internal/advisor/AdviceHelper.java +++ b/hibernate-entitymanager/src/main/java/org/hibernate/jpa/graph/internal/advisor/AdviceHelper.java @@ -47,32 +47,25 @@ public class AdviceHelper { if ( attributeNode.getAttribute().isCollection() ) { return new CollectionFetch( (SessionFactoryImplementor) attributeNode.entityManagerFactory().getSessionFactory(), - "abc-xyz", // alias LockMode.NONE, fetchOwner, new FetchStrategy( FetchTiming.IMMEDIATE, FetchStyle.SELECT ), - attributeNode.getAttributeName(), - null, // sql table alias - null // entityaliases + attributeNode.getAttributeName() ); } else { return new EntityFetch( (SessionFactoryImplementor) attributeNode.entityManagerFactory().getSessionFactory(), - "abc-xyz", // alias LockMode.NONE, fetchOwner, attributeNode.getAttributeName(), - new FetchStrategy( FetchTiming.IMMEDIATE, FetchStyle.SELECT ), - null, // sql table alias - null // entityaliases + new FetchStrategy( FetchTiming.IMMEDIATE, FetchStyle.SELECT ) ); } } else { return new CompositeFetch( (SessionFactoryImplementor) attributeNode.entityManagerFactory().getSessionFactory(), - "abc-xyz", // alias fetchOwner, attributeNode.getAttributeName() ); diff --git a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/BasicGraphLoadPlanAdviceTests.java b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/BasicGraphLoadPlanAdviceTests.java index 949a827118..521e83eecd 100644 --- a/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/BasicGraphLoadPlanAdviceTests.java +++ b/hibernate-entitymanager/src/test/java/org/hibernate/jpa/test/graphs/BasicGraphLoadPlanAdviceTests.java @@ -37,12 +37,10 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.jpa.graph.internal.EntityGraphImpl; import org.hibernate.jpa.graph.internal.advisor.EntityGraphBasedLoadPlanAdvisor; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; -import org.hibernate.loader.DefaultEntityAliases; import org.hibernate.loader.plan.internal.LoadPlanImpl; import org.hibernate.loader.plan.spi.EntityReturn; import org.hibernate.loader.plan.spi.LoadPlan; import org.hibernate.loader.spi.LoadPlanAdvisor; -import org.hibernate.persister.entity.Loadable; import org.junit.Test; @@ -71,11 +69,8 @@ public class BasicGraphLoadPlanAdviceTests extends BaseEntityManagerFunctionalTe return new LoadPlanImpl( new EntityReturn( sfi(), - "abc", LockMode.NONE, - ENTIYT_NAME, - "a1", - new DefaultEntityAliases( (Loadable) sfi().getEntityPersister( ENTIYT_NAME ), "1" ) + ENTIYT_NAME ) ); }