java如何为此编写HQL查询?
我想要一个HQL查询,返回包含给定用户的所有组,这些用户是在给定日期之前创建的。不知怎么的,我做不好
public class Group
{
@ManyToMany
Set<User> users;
Date created;
}
public class User
{
...
}
你可以在下面搜索框中键入要查询的问题!
我想要一个HQL查询,返回包含给定用户的所有组,这些用户是在给定日期之前创建的。不知怎么的,我做不好
public class Group
{
@ManyToMany
Set<User> users;
Date created;
}
public class User
{
...
}
# 1 楼答案
II Bhima的答案基本上是正确的-这里有一个小修正:
您需要它,以便返回组,而不是带有组用户2元组的对象[]