OgmSession session = openSession();
Transaction transaction = session.beginTransaction();
String nativeQuery = "{ $query : { author : 'Oscar Wilde' }, $orderby : { name : 1 } }";
@SuppressWarnings("unchecked")
List<OscarWildePoem> result = session.createNativeQuery( nativeQuery )
.addEntity( OscarWildePoem.TABLE_NAME, OscarWildePoem.class )
.list();
assertThat( result ).onProperty( "id" ).containsExactly( 2L, 3L, 1L );