query.from(user)
...
.list(Projections.bean(User.class, user.id, user.commonName, user.selected));
如何在上面将user.selected硬编码为true或false?
注意:我user.selected
where(...)
答案 0 :(得分:1)
喜欢这个
query.from(user)
.list(Projections.bean(User.class, user.id, user.commonName,
BooleanTemplate.TRUE.as("selected")));