Hibernate version: 3.0.5
HI, I have a pretty silly question about Modulo Operation in HQL.
How can I use it in a HQL query.
I think I missed a function Name or operator for this.
My Searching on the Forum and on the Internet had no success in finding any infomration about this topic.
It seems to me that hibernate does not support this Operation in HQL.
Documentation does not even contain the word modulo.
Perhaps it is non Standard, but it is a needed fucntion.
My query looks like:
---------------------------------------------------------------------------------
SELECT a FROM Cat a WHERE (a.age % a.numberOfChilds) > 10
---------------------------------------------------------------------------------
Hibernate Exception:
org.hibernate.QueryException: unexpected char: '%'
I am looking for a way to use this Modulo Operation without Native SQLQuery.
Is there any Solution you know. Maybe a secret operation name, or a way to enhance Hibernate to add this Operation.
Thanks in advance to all of you, who are reading this.
I hope you can help me.
|