[英]Querydsl and unexpected end of subtree
似乎该查询是以正确的方式组成的。 SomeId
存在。 但是,我收到以下错误:
<AST>:0:0: unexpected end of subtree
Invalid path: 'Entity.id'
Invalid path: 'Entity.code'
left-hand operand of a binary operator was null
查询代码(在另一部分用作子查询):
JPAQueryFactory entityElementJPA = entityElementDAO.getJpaFactory();
entityElementJPA
.select(QEntity.Entity.id)
.where(
QEntity.Entity.code.eq(
entityElementJPA
.select(
QEntity.Entity.code)
.where(QEntity.Entity.id.eq(someId))
)
.and(QEntity.Entity.id.ne(someId))
);
我是 java 和 querydsl 的新手,如果问题很简单,对不起
有什么线索吗?
.from()
丢失,因为应该使用 JPAQueryFactory
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.