java - How to do JOIN ON query using Criteria API -


since version 2.1 jpa supports join on. found few examples how use join on in jpql none criteria api, , here question:

is join on implemented in criteria api? , if yes, can provide example?

try this

criteriaquery<person> crit = cb.createquery(person.class); root<person> candidateroot = crit.from(person.class); join<person, address> addrjoin = candidateroot.join(person_.address, jointype.inner); addrjoin.on({some predicate}); 

filling "{some predicate}" whatever on clause want impose.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -