我正在使用以下标准来检索Person
授予特定角色的所有对象(在 中PersonService
):
@Transactional(readOnly = true)
List findAllByRoles(authorities) {
Person.createCriteria().list {
personRoles {
role {
'in'('authority', authorities)
}
}
order('name', 'asc')
}.unique(false)
}
我现在遇到的问题是它返回List
带有Person__$$__javassist_67
对象而不是Person
对象。
我如何更改语句以检索Person
对象?
编辑:
我需要这个,因为我正在使用与另一个Person
对象列表相关的列表。正如我想removeAll
在两个列表之一上使用的那样,两者都需要包含相同类型的对象,但情况并非如此。