Hi, I am unable to select a transient property in my JPQL query. Is this supported?
Error:
java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Problem compiling [select e.net from test$Sale e].
The state field path 'e.net' cannot be resolved to a valid type.
JPQL:
select e.net from test$Sale e
I’ve tried a couple variations in my entity.
First Attempt:
@MetaProperty(related={"gross", "discount"})
public BigDecimal getNet() {
return gross - discount;
}
Second attempt:
@Transient
@MetaProperty(related={"gross", "discount"})
protected BigDecimal net;
public BigDecimal getNet() {
return gross - net;
}
Thanks!