use of org.hibernate.testing.FailureExpected in project hibernate-orm by hibernate.
the class PluralAttributeExpressionsTest method testElementMapIsEmptyCriteria.
@Test
@TestForIssue(jiraKey = "HHH-11225")
@FailureExpected(jiraKey = "HHH-6686")
public void testElementMapIsEmptyCriteria() {
doInJPA(this::entityManagerFactory, entityManager -> {
final HibernateCriteriaBuilder cb = (HibernateCriteriaBuilder) entityManager.getCriteriaBuilder();
final CriteriaQuery<MapEntity> criteria = cb.createQuery(MapEntity.class);
final Root<MapEntity> root = criteria.from(MapEntity.class);
criteria.select(root).where(cb.isMapEmpty(root.get(MapEntity_.localized)));
entityManager.createQuery(criteria).getResultList();
});
}
use of org.hibernate.testing.FailureExpected in project hibernate-orm by hibernate.
the class MergeNotNullCollectionUsingIdentityTest method testOneToManyNotNullCollection.
@Test
@FailureExpected(jiraKey = "HHH-9979")
public void testOneToManyNotNullCollection() {
Parent parent = new Parent();
Child child = new Child();
List<Child> children = new ArrayList<Child>();
children.add(child);
child.setParent(parent);
parent.setChildren(children);
Session s = openSession();
Transaction t = s.beginTransaction();
parent = (Parent) s.merge(parent);
t.commit();
s.close();
s = openSession();
t = s.beginTransaction();
s.delete(parent);
t.commit();
s.close();
}
use of org.hibernate.testing.FailureExpected in project hibernate-orm by hibernate.
the class QueryAndSQLTest method testNativeQueryWithFormulaAttributeWithoutAlias.
@Test
@FailureExpected(jiraKey = "HHH-2225")
public void testNativeQueryWithFormulaAttributeWithoutAlias() {
String sql = "select TABLE_NAME , sysdate() from all_tables where TABLE_NAME = 'AUDIT_ACTIONS' ";
Session s = openSession();
s.beginTransaction();
s.createSQLQuery(sql).addEntity("t", AllTables.class).list();
s.getTransaction().commit();
s.close();
}
use of org.hibernate.testing.FailureExpected in project hibernate-orm by hibernate.
the class ComponentTest method testComponentQueryMethodNoParensFailureExpected.
@Test
@RequiresDialect(value = SybaseASE15Dialect.class)
@FailureExpected(jiraKey = "HHH-3150")
public void testComponentQueryMethodNoParensFailureExpected() {
// Sybase should translate "current_timestamp" in HQL to "getdate()";
// This fails currently due to HHH-3510. The following test should be
// deleted and testComponentQueries() should be updated (as noted
// in that test case) when HHH-3510 is fixed.
Session s = openSession();
Transaction t = s.beginTransaction();
Employee emp = new Employee();
emp.setHireDate(new Date());
emp.setPerson(new Person());
emp.getPerson().setName("steve");
emp.getPerson().setDob(new Date());
s.save(emp);
s.createQuery("from Employee e where e.person = ('steve', current_timestamp)").list();
s.delete(emp);
t.commit();
s.close();
}
use of org.hibernate.testing.FailureExpected in project hibernate-orm by hibernate.
the class ProxyTest method testRefreshLockUninitializedProxyThenRead.
@Test
@FailureExpected(jiraKey = "HHH-1645", message = "Session.refresh with LockOptions does not work on uninitialized proxies")
public void testRefreshLockUninitializedProxyThenRead() {
Session s = openSession();
Transaction t = s.beginTransaction();
DataPoint dp = newPersistentDataPoint(s);
dp = (DataPoint) s.load(DataPoint.class, new Long(dp.getId()));
assertFalse(Hibernate.isInitialized(dp));
s.refresh(dp, LockOptions.UPGRADE);
dp.getX();
assertSame(LockOptions.UPGRADE.getLockMode(), s.getCurrentLockMode(dp));
s.delete(dp);
t.commit();
s.close();
}
Aggregations