Trying to wrap my head around nHibernate, curiuos how this scenerio would be handled:
Post (postID, title, content, dateCreated)
Category (categoryID, name, postCount)
post_to_categories (postID, categoryID)
If I create a Post
, it should insert into Post
, insert into post_to_categories
and update the postCount
in Category
.
I am planning on using the iRepository
pattern also.
How would this be done with nHibernate? (mapping file example?)