Different entities? No, not really.

Surname was a generic example of a search that someone might do
against a single entity type where they might have loaded an object
(or already added it themselves if its new) into the session cache.

I thought that when the search took place NH would search its L1 cache
first with the query before hitting the DB, as it would save a DB
call, but when I sit down to think about it for 5 minutes I can
understand why it doesn't in this case as the surname is not a key
field - you'll need to hit the DB anyway to make sure there isn't a
second entity saved by someone else that matches the criteria.

However, if I was searching by key I could see the value in hitting
the L1 cache first, then hitting the DB if not found, and relying on
stale state to deal with any updated data conflicts.

I don't know if this is what NH does - I didn't get a yes or no answer
from my previous question, but it doesn't really matter as I just need
to get round to writing a test to find out.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to