Hibernate version:
2.1.7c
I want to be able to obtain only those Happening objects from database, which contain type objects whose id is (in this case) 4.
Is there an easy way to accomplish this?
Each happening can be of several types (finnish, restaurant, etc...)
The types are stored in a Set in Happening class.
classes (simplified):
Code:
public class Happening
{
private Set types // stores Type objects
// setter & getter method for types
}
public class Type()
{
private int id;
private String name
// setter & getter methods for id and name
}
Name and version of the database you are using:
MySql 4.1.12 (Windows XP)
[/quote]