use of org.hibernate.engine.spi.SessionImplementor in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetIdentifier.
@Test
public void testGetIdentifier() {
assertNull(((TestEntityPersister) classMetadataTarget).session);
final SessionImplementor sessionTarget = createSession();
ISession sessionFacade = FACADE_FACTORY.createSession(sessionTarget);
@SuppressWarnings("serial") Serializable theObject = new Serializable() {
};
Object anotherObject = classMetadataFacade.getIdentifier(theObject, sessionFacade);
assertSame(theObject, anotherObject);
assertSame(sessionTarget, ((TestEntityPersister) classMetadataTarget).session);
}
use of org.hibernate.engine.spi.SessionImplementor in project jbosstools-hibernate by jbosstools.
the class ClassMetadataFacadeTest method testGetIdentifier.
@Test
public void testGetIdentifier() {
assertNull(((TestEntityPersister) classMetadataTarget).session);
final SessionImplementor sessionTarget = createSession();
ISession sessionFacade = FACADE_FACTORY.createSession(sessionTarget);
@SuppressWarnings("serial") Serializable theObject = new Serializable() {
};
Object anotherObject = classMetadataFacade.getIdentifier(theObject, sessionFacade);
assertSame(theObject, anotherObject);
assertSame(sessionTarget, ((TestEntityPersister) classMetadataTarget).session);
}
Aggregations