Skip to content

How to create join

xjodoin edited this page Mar 14, 2013 · 2 revisions

TorpedoQuery support inner join, left join and right join.

Entity entity = from(Entity.class);
SubEntity subEntity = innerJoin(entity.getSubEntities());
Query<String[]> select = select(entity.getCode(), subEntity.getName());

List<String[]> results = select.list(entityManager);
Clone this wiki locally