Hi,
I wonder if anyone can help me. Im brand new to HQL and am struggling a little. Basically I need to write a simple query that selects all values based on a foreign key(pattern_group_id) and store these in a list.
This is what I have so far:
List<
String> patternByGroupList = sessionFactory.getCurrentSession()
.createQuery("SELECT * FROM
PATTERN p WHERE pattern_group_id = :id")
.setParameter("id", groupName)
.setCacheable(true)
.list();
which is wrong. I need to write it so that it does a sub query within to select the pattern_group_id based on whatever the groupname (which is a String parameter) is. Can anyone point me in the right direction?
Thanks,