2008/12/19 Fabio Maulo <[email protected]> > interesting point.... no hardcoded strings but no problem with hardcoded > query with hardcoded usage of cache and hardcode cache region without the > ability to optimize it using SQL (without touch the code that are using the > query). Very interesting point... >
Sorry I had forgot to say that you can write the HQL in the mapping as a namedQuery. What happen there is: 1) the query is parsed and compiled at BuildSessionFactory (mean SQL command prepared too) 2) in the mapping you can configure all cache matters 3) if you need you can change the HQL to an SQL (NH style if you want) without touch existing code 4) compiled queries are parsed one and only one time -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
