InterviewSolution
| 1. |
What Is A Persistent Collection? |
|
Answer» This TERM is used in NHibernate to refer to a collection of its internal class (NHibernate.Collections.Set, List, Bag, etc.) which wraps a user's collection. All collections belonging to ENTITIES returned by NHibernate are PERSISTENT (= wrapped). Entities passed to Save also have their collections wrapped and replaced by the WRAPPERS as a part of the saving process. Persistent collections have a snapshot of their original state and can therefore be updated more efficiently. Collections containing query results are not persistent, they are plain .NET collections (=ArrayList=s). This term is used in NHibernate to refer to a collection of its internal class (NHibernate.Collections.Set, List, Bag, etc.) which wraps a user's collection. All collections belonging to entities returned by NHibernate are persistent (= wrapped). Entities passed to Save also have their collections wrapped and replaced by the wrappers as a part of the saving process. Persistent collections have a snapshot of their original state and can therefore be updated more efficiently. Collections containing query results are not persistent, they are plain .NET collections (=ArrayList=s). |
|