views:

18

answers:

1

Hi all. I hope you can help somewhat novice to NHibernate with the following question. Suppose we have two table: Page and WorkPage. Page table contains unversioned data and WorkPage contains versioned Data of the same Page, i.e. there is a relation one-to-many between Page and WorkPage.

In the code we have an entity containing all of the properties from Page and WorkPage tables, and what is more these properties are on a par - they are not grouped into any sub-entity for versioned data and unversioned data.

How would I map such an entity to these tables with NHibernate?

A: 

You wouldn't? Nor would I see why you would want to. It sounds like from an domain point of view you have two separate entities and possibly a third entity that is missing. The root which holds a Page and WorkPage.

ShaneC

related questions