[英]How to use querydsl to do a operation in a object with a list?
I have a path object in java created by querydsl.我有一个由 querydsl 创建的 java路径对象。
This is the result of toString method: lote.edificacoes.id这是 toString 方法的结果: lote.edificacoes.id
lote is the object lote是对象
edificacoes is the list inside the object edificacoes是对象内的列表
id is the attribute that i'd like to do the operation id是我想要进行操作的属性
When i use path.gt(100) for example, i'm getting the following error: illegal attempt to dereference collection例如,当我使用path.gt(100) 时,我收到以下错误:非法尝试取消引用集合
It's not possible do a join cause i just have the path object because this object is created by a reflection.不可能进行连接,因为我只有路径对象,因为该对象是由反射创建的。
This a example from my code这是我的代码中的一个例子
Lote class乐透类
@Entity
public class Lote {
@OneToMany(mappedBy = "lote", fetch = FetchType.EAGER)
private List<Edificacao> edificacoes;
//getter and setter
}
path.gt(100);路径.gt(100);
I expected the output of the list of results, a list of Lote我期望的结果列表的输出,一个Lote的列表
Well, according to the documentation this is not possible.好吧,根据文档,这是不可能的。
http://lists.jboss.org/pipermail/hibernate-issues/2007-July/006157.html http://lists.jboss.org/pipermail/hibernate-issues/2007-July/006157.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.