christian wrote:
I think that queries should be externalized to the mapping files, hence I don't see a problem with either language or "wrong SQL".
I do agree. But what I was suggesting to consider is that using HQL in a formula property will keep the model more flexible and programmers do not need to know stuff, e.g the real schema, table name or column name, in the depoyment process, but just use HQL in the formula. In my opition, it is a good engineering practice not to use two classes of query statements together in the same model.
Just a personal point and welcome any discussion.
Regards,
James