use of org.hibernate.testing.logger.Triggerable in project hibernate-orm by hibernate.
the class CollectionPropertyDeprecationsTest method testReferencingMapElements.
@Test
@TestForIssue(jiraKey = "HHH-11400")
public void testReferencingMapElements() {
// NOTE : JPA's VALUE ought to work fine as we never supported
// that in the legacy form...
Triggerable triggerable = logInspection.watchForLogMessages("HHH90000016");
// first the accepted ways
compileQuery("select elements(h.family) from Human h");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
compileQuery("select h from Human h where h.name.first in elements(h.family)");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
// then the deprecated way
compileQuery("select h.family.elements from Human h");
assertTrue(triggerable.wasTriggered());
}
use of org.hibernate.testing.logger.Triggerable in project hibernate-orm by hibernate.
the class CollectionPropertyDeprecationsTest method testReferencingBagElements.
@Test
@TestForIssue(jiraKey = "HHH-11400")
public void testReferencingBagElements() {
Triggerable triggerable = logInspection.watchForLogMessages("HHH90000016");
// first the accepted ways
compileQuery("select elements(h.friends) from Human h");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
compileQuery("select h from Human h where h in elements(h.friends)");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
// then the deprecated way
compileQuery("select h.friends.elements from Human h");
assertTrue(triggerable.wasTriggered());
}
use of org.hibernate.testing.logger.Triggerable in project hibernate-orm by hibernate.
the class CollectionPropertyDeprecationsTest method testReferencingListIndices.
@Test
@TestForIssue(jiraKey = "HHH-11400")
public void testReferencingListIndices() {
Triggerable triggerable = logInspection.watchForLogMessages("HHH90000016");
// first the accepted ways
compileQuery("select indices(u.permissions) from User u");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
compileQuery("select u from User u where u.userName in indices(u.permissions)");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
// then the deprecated way
compileQuery("select u.permissions.indices from User u");
assertTrue(triggerable.wasTriggered());
}
use of org.hibernate.testing.logger.Triggerable in project hibernate-orm by hibernate.
the class CollectionPropertyDeprecationsTest method testReferencingListElements.
@Test
@TestForIssue(jiraKey = "HHH-11400")
public void testReferencingListElements() {
Triggerable triggerable = logInspection.watchForLogMessages("HHH90000016");
// first the accepted ways
compileQuery("select elements(u.permissions) from User u");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
compileQuery("select u from User u where u.userName in elements(u.permissions)");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
// then the deprecated way
compileQuery("select u.permissions.elements from User u");
assertTrue(triggerable.wasTriggered());
}
use of org.hibernate.testing.logger.Triggerable in project hibernate-orm by hibernate.
the class CollectionPropertyDeprecationsTest method testReferencingMapIndices.
@Test
@TestForIssue(jiraKey = "HHH-11400")
public void testReferencingMapIndices() {
// NOTE : JPA's KEY ought to work fine as we never supported
// that in the legacy form...
Triggerable triggerable = logInspection.watchForLogMessages("HHH90000016");
// first the accepted ways
compileQuery("select indices(h.family) from Human h");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
compileQuery("select h from Human h where h.name.first in indices(h.family)");
assertFalse(triggerable.wasTriggered());
triggerable.reset();
// then the deprecated way
compileQuery("select h.family.indices from Human h");
assertTrue(triggerable.wasTriggered());
}
Aggregations