As far as i know, there is no way to convert HQL to Criteria for easy 
modification, and there is no way to parse query-string to Criteria. I have 
fount that i can parse HQL query to HqlTreeNode and easy modify this tree 
with custom filters, but i can not find any way to execute this query-tree. 
May be i can pass it to inner session impl? Or can i stringify it back to 
HQL and execute it?

вторник, 23 декабря 2014 г., 14:18:19 UTC+3 пользователь Ricardo Peres 
написал:
>
> I'd say HQL or Criteria are your friends.
>
> RP
>
> On Tuesday, December 23, 2014 6:54:35 AM UTC, vlad wrote:
>>
>> Hello everybody,
>>
>> We are building metadata-driven application, and we store metadata in DB. 
>> And we need to be able to define user queries as part of metadata and show 
>> results in grid with filters and sorting. Queries should be plain text, 
>> human-readable. User queries can be very complex, including subqueries. I'm 
>> looking forward to use HQL for them. But i'm not sure what is the best 
>> practice to append grid filters and sorting to user HQL query? Should i 
>> work with strings? Or should i parse HQL to HqlTreeNode, modify it, and 
>> somehow execute? Maybe there is another solution?
>>
>> Thanks
>> Vlad
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to