Browse by Tags
All Tags »
NHibernate (
RSS)
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . When mapping a collection of elements, this collection should not be marked as inverse . This is a different behavior from many to many or one to many, and it...
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . By default, when you have a mapped DateTime property on an entity, if you don’t specify any type, NHibernate will use the NHibernate.Type.DateTimeType type....
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . Starting with NHibernate 3.3.3, the order by which the Take and Where operators are placed on a LINQ query matters, whereas before this version, it didn’t. This...
With extensibility virtually everywhere, NHibernate is nice to work with! Consider, for example, a need to call a database-specific function in a LINQ query – a typical request. In SQL Server there is the SOUNDEX function, which can be used to generate...
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . When you use the Table Per Class Hierarchy inheritance mapping pattern ( Single Table Inheritance in Martin Fowler’s terminology), all properties of derived...
After my previous post , Adam Bar suggested that setting an SQL Delete command might be a better idea, I actually agree with him, so I decided to post an alternative solution. For those not familiar with the concept, NHibernate lets us specify SQL commands...
Because the SaveOrUpdateCopy method of ISession is marked as obsolete, we no longer have an API method that allows us to attach a disconnected entity (meaning: coming from a session that no longer exists) to a new session without going to the database...
Updated: thanks, Adam Sometimes we are not allowed to physically delete records from a database. This may be because of some policy, legal obligations, traceability, or whatever. It is sometimes called “soft deleting”. NHibernate offers an elegant solution...
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here . You shouldn’t be making changes to the configuration instance after the session factory is built, because it won’t know about these changes. These include: Adding...
Since this blog started, back in 2008, I wrote a lot of posts. I’d say some are still up to date. I picked a few of them, those I’m more proud of, in no particular order. ASP.NET Web Forms: Using the ASP.NET Health Monitoring Provider to Secure Your Application...
More Posts
Next page »