2009/7/1 Graham Bunce <grahambu...@hotmail.com> > > And to explain your issue, NH always goes to the DB for a query. I > suspect this is for performance reasons as how can it search its cache > on any number of unknown (by the NH designer) parameters that a > developer will provide? It would just be too slow. Therefore it will > ONLY go to the cache where you provide an ID via a non-criteria call > (e.g. Load). It's the only way that I can see it performing. Also, who > is to say that an object you search on by (e.g. name) is the same > object as you added to the cache previously. You may *know* its the > same because you understand the logic, but NH does not. Therefore it > needs to go to the DB to ensure it has the latest view of the DB world > - which ultimately is what NH is all about.
You can even explain the "logic" to NH using <natural-id> ;) -- Fabio Maulo I prefer to try something good and fail, than to try something wrong and achieve it --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to nhusers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---