@Test public void testCountDistinctWorkaround() { Entity fromOrder = from(Entity.class); Query<Long> select = select(function("count", Long.class, distinct(fromOrder.getInterface()))); assertEquals( "select count(distinct entity_0.interface) from Entity entity_0", select.getQuery()); }
@Test public void testCountDistinct() { Entity fromOrder = from(Entity.class); // throws an NPE Query<Long> select = select(count(distinct(fromOrder.getInterface()))); assertEquals( "select count(distinct entity_0.interface) from Entity entity_0", select.getQuery()); }
@Test public void testDistinctOnInterface() { Entity fromOrder = from(Entity.class); Query select = select(distinct(fromOrder.getInterface())); assertEquals("select distinct entity_0.interface from Entity entity_0", select.getQuery()); }