0

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?

Eugene Strizhok
  • 1,145
  • 2
  • 12
  • 19
  • whats the reasoning behind saving versioned data when you remove them in you objectmodel? sooner or later you want to access more than one Version of the Versioned data and then you have to have subentities, so why bother trying to work around it? – Firo Oct 12 '11 at 16:05

1 Answers1

0

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.

Shane Courtrille
  • 13,960
  • 22
  • 76
  • 113