I have a parent entity mapped with an inverse child collection
 ... child collection fetchmode is JOIN.
 ... parent is mapped cache readwrite, not lazy
 ... child is mapped cache readwrite, not lazy

When I retrieve the parent the first time, it's done with the Join as
expected.

However, once the parent is cached, I get one cache entry in profiler
(the parent)
BUT then the children are loaded with a query like 'where
childtable.parentFK = parentID'

my real first question -- is all this by design? and then supposing it
is ...

1) why aren't the child collection entities also loaded from cache?
2) if I query (using criteria) a list of parents, the first retrieve
spawns 1 SQL query.
    But when I query again (the query is cached), NH has the query
cached, so gets all the parents from it.
    However, it then spawns n+1 queries for all the child collections
where n = parent entity...

any ideas???

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