Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

join table in where clause criteria in java hibernate

		Criteria criteria = getSession().createCriteria(MainTable.class);
        criteria.createAlias("anotherTableVariable", "t2"); // Alias with association variable
        criteria.add(Restrictions.eq("t2.name", name));
       
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #join #table #clause #criteria #java #hibernate
ADD COMMENT
Topic
Name
1+3 =