Mapping components

So far we have been using the term entity to refer to classes that NHibernate is able to persist to database. But when it comes to NHibernate, there is more to that term. An entity is something that has its own identifier and can be distinguished from another instance of same type by using the identifier value. An important feature of entity is that NHibernate is able to track the entity. This means that NHibernate knows whether the entity is only present in memory but is not persisted to database, or is persisted to database but the instance in the memory is updated, and so on (sometimes this is also called dirty tracking). Another important feature of entities is that they are saved in their own database table. The way NHibernate ...

Get Learning NHibernate 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.