@Test
public void testLikeNamesDeepPath()
{

    Query query = Query.from( schemaService.getDynamicSchema( DataElementGroup.class ) );
    query.setObjects( dataElementGroups );
    Disjunction disjunction = query.disjunction();
    disjunction.add( Restrictions.like( "dataElements.name", "ElementD", MatchMode.END ) );
    disjunction.add( Restrictions.like( "dataElements.name", "ElementA", MatchMode.END ) );
    List<? extends IdentifiableObject> objects = queryEngine.query( query );
    assertEquals( 2, objects.size() );
    assertTrue( collectionContainsUid( objects, "abcdefghijA" ) );
    assertTrue( collectionContainsUid( objects, "abcdefghijB" ) );
}