HHH-8388 - pull in final jpa-api 2.1
This commit is contained in:
parent
8b7a92e170
commit
cf9bd9d13f
|
@ -197,7 +197,7 @@ public class EntityManagerImpl extends AbstractEntityManagerImpl implements Sess
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T> EntityGraph<T> getEntityGraph(String graphName) {
|
public EntityGraph<?> getEntityGraph(String graphName) {
|
||||||
checkOpen();
|
checkOpen();
|
||||||
final EntityGraphImpl named = getEntityManagerFactory().findEntityGraphByName( graphName );
|
final EntityGraphImpl named = getEntityManagerFactory().findEntityGraphByName( graphName );
|
||||||
if ( named == null ) {
|
if ( named == null ) {
|
||||||
|
|
|
@ -80,6 +80,7 @@ public class BasicEntityGraphTests extends BaseEntityManagerFunctionalTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void testBasicGraphImmutability() {
|
public void testBasicGraphImmutability() {
|
||||||
EntityManager em = getOrCreateEntityManager();
|
EntityManager em = getOrCreateEntityManager();
|
||||||
EntityGraph<Entity1> graphRoot = em.createEntityGraph( Entity1.class );
|
EntityGraph<Entity1> graphRoot = em.createEntityGraph( Entity1.class );
|
||||||
|
@ -88,7 +89,7 @@ public class BasicEntityGraphTests extends BaseEntityManagerFunctionalTestCase {
|
||||||
|
|
||||||
em.getEntityManagerFactory().addNamedEntityGraph( "immutable", graphRoot );
|
em.getEntityManagerFactory().addNamedEntityGraph( "immutable", graphRoot );
|
||||||
|
|
||||||
graphRoot = em.getEntityGraph( "immutable" );
|
graphRoot = (EntityGraph<Entity1>) em.getEntityGraph( "immutable" );
|
||||||
|
|
||||||
assertEquals( "immutable", graphRoot.getName() );
|
assertEquals( "immutable", graphRoot.getName() );
|
||||||
assertEquals( 2, graphRoot.getAttributeNodes().size() );
|
assertEquals( 2, graphRoot.getAttributeNodes().size() );
|
||||||
|
|
Loading…
Reference in New Issue