NHibernate Pitfalls Index
Updated on June 22th
These are the posts on NHibernate pitfalls I’ve written so far. This post will be updated whenever there are more.
- The SaveOrUpdate Event
- Collection Restrictions
- Specifying Event Listeners in XML Configuration
- Many to Many and Inverse
- Bags and Join
- Lazy Properties in Non-Lazy Entities
- Adding to a Bag Causes Loading
- Flushing Changes
- Private Setter on Id Property
- Stateless Sessions
- Table Per Concrete Type and Native Id Generators
- HQL, LINQ and Eager Loading
- Batching and Native Id Generators
- Large Strings
- Composite Keys
- Ghosts
- Entity Refresh
- Lazy Properties and Closed Sessions
- Merge
- SELECT N + 1
- Fetch and Lazy
- Lazy Entities and Virtual Members
- Querying a Collection Count
- SQL Queries and Parameter Prefix
- Lazy Scalar Properties Must Be Auto
- Cascades
- Eager Loading Multiple Collections
- Querying Unmapped Properties With LINQ
- Inheritance and Proxies
- QueryOver and Deep Expressions
- Custom Types and Detecting Changes
- Flush Mode
- Sets and Hash Codes
- Manually Assigned Identifiers
- Schema Auto Action
- Identity Identifiers
- Batch Loading
- Integrating NHibernate Validator
- Making Changes to the Configuration After the Session Factory Is Built
- Non Nullable Columns in Table Per Class Hierarchy Inheritance
- Take and Where Order in LINQ Queries
- DateTime Type Loses Milliseconds
- Collections of Elements and Inverse
- Table Schema
- Outer Joins of Unrelated Entities
- Aggregating Non-Nullable Numerical Values Without Records
- Fetch and Paging
- Loading Foreign Key Properties
- Querying Unmapped Classes
- XML Mappings
- HQL Delete Does Not Cascade
- Criteria and Collections of Non-Entities
- Get and Filters
- Deletes
- One Shot Delete and Inverse Collections
- Specifying Property Types
- Refreshing Manually Created Entities Does Not Bring Lazy Properties of Base Types
- HQL Queries With Joins
- Versioned Entities Are Not Batcheable
- Sharing a Session in Multiple Threads