Hello,
When I try to put a transiant column in a grid, an axeption is raised.
What am I doing wrong, what’s the propoer way to do so ?
Below are the XML file that for a simple test case that reproduces the error :
Model :
<entity name="ent1" cachable="true">
<string name="name" title="Nom" required="true" unique="true"/>
<integer name="calc" title="Calculé" transient="true"><![CDATA[
return 7;
]]></integer>
</entity>
View :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Exception dump :
2016-12-22 15:27:53,897 [http-bio-8080-exec-2] DEBUG com.axelor.rpc.Resource - JPQL: SELECT new List(self.id, self.version, self.name, self.calc) FROM ent1 self WHERE (self.archived is null OR self.archived = false) ORDER BY self.name
2016-12-22 15:27:53,988 [http-bio-8080-exec-2] ERROR com.axelor.rpc.Resource - Error: java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: calc of: xar.xarerp.db.ent1 [SELECT new List(self.id, self.version, self.name, self.calc) FROM xar.xarerp.db.ent1 self WHERE (self.archived is null OR self.archived = false) ORDER BY self.name]
java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: calc of: xar.xarerp.db.ent1 [SELECT new List(self.id, self.version, self.name, self.calc) FROM xar.xarerp.db.ent1 self WHERE (self.archived is null OR self.archived = false) ORDER BY self.name]