views:

176

answers:

2

I have this problem.

I have a module (module 1) that use Nhibernate to manage entity persistence; this module interacs with an other module (module 2).

The "module 2" allows to generate dynamically native SQL where clause. Now I would use it to manage filter operation in "module 1".

Which is the bast way to do it?

Is possible get the native SQL Select from "Nhibernate" entity without write manually it? Then, if I get the native SQL Select statement I can easily apply where. Is there a better way?

Otherwise, is possible translate navite SQL statement to HQL statement?

A: 

i don't exactly understand your problem but it seems to me that filters is what you want

Jaguar
A: 

Really I had a old procedure that build where clause and return it in SQL Native Format (according to specific preset)...now to solve my problem I have modified the procedere to obtain the where clause in HQL Format so apply it to my entity. So it works.

LukePet