Hi, I have this in my mapping file:
<property name="bonnen" formula="SELECT SUM(bonnen) FROM verkoperdag" />
but when I try to use it, it say the column bonnen doesn't exist. Of course it doesn't exist, I want to return a formula result, not a database column. I've tried different queries, but all with the same result.
I've also tried to with and without a field+getter/setter in a POJO, but hibernate complains about missing getters and setters.
When I try to run hbm2java against this, it says the field "bonnen" doesn't exist and stops. When I add a type="float", it runs and generates normal getters and setters. hbm2ddl generates a column for data, which I don't want.
The documentation and examples found on google use similair examples, so what am I doing wrong?
Thanks!
|