I've noticed I can use an entity as a paramter in a query like follows:
Code:
User user = new User("john");
session.find("from test.Group as group where group.user = ?",
user, Hibernate.entity(User.class));
I'd also like to use a composite class in my query, but I can't quite figure out what Type to pass in. For example:
Code:
class User {
private Name name;
Name getName() { return name; }
void setName(Name name) { this.name = name; }
}
Name name = new Name("John");
session.find("from test.User as user where user.name = ?",
name, *** What is the Type? ***);
What do I pass in for type?
Thanks,
John