I have to following entity object
@Entity
public class Foobar {
...
private List uuids;
...
}
Now I\'d like to
The solution with the sqlRestriction from jira http://opensource.atlassian.com/projects/hibernate/browse/HHH-869 seemed the best way to go for me since i heavily use criteria api. I had to edit Thierry's code so it worked in my case
Model:
@Entity
public class PlatformData
{
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long iID;
private List iPlatformAbilities = new ArrayList();
}
Criteria call:
tCriteria.add(Restrictions.sqlRestriction(
"{alias}.id in (select e.id from platformData e, platformdata_platformabilities v"
+ " where e.id = v.platformdata_id and v.element = ? )", aPlatformAbility.toString(),
Hibernate.STRING));