use of org.hibernate.tuple.entity.EntityMetamodel in project hibernate-orm by hibernate.
the class InheritedNaturalIdTest method testNaturalIdNullability.
@Test
@TestForIssue(jiraKey = "HHH-10360")
public void testNaturalIdNullability() {
final EntityPersister persister = sessionFactory().getEntityPersister(User.class.getName());
final EntityMetamodel entityMetamodel = persister.getEntityMetamodel();
// nullability is not specified, so it should be nullable by annotations-specific default
assertTrue(persister.getPropertyNullability()[entityMetamodel.getPropertyIndex("uid")]);
}
use of org.hibernate.tuple.entity.EntityMetamodel in project hibernate-orm by hibernate.
the class MutableNaturalIdTest method testNaturalIdNullability.
@Test
@TestForIssue(jiraKey = "HHH-10360")
public void testNaturalIdNullability() {
final EntityPersister persister = sessionFactory().getEntityPersister(User.class.getName());
final EntityMetamodel entityMetamodel = persister.getEntityMetamodel();
// nullability is not specified, so it should be non-nullable by hbm-specific default
assertFalse(persister.getPropertyNullability()[entityMetamodel.getPropertyIndex("name")]);
assertFalse(persister.getPropertyNullability()[entityMetamodel.getPropertyIndex("org")]);
}
Aggregations