Blog
Id
...
List of Posts
Last Post <---
Most Viewed Post <---
Post
Id
...
Blog (the blog it belongs to)
List of Posts
我曾经在实体中只有一个Blog
,但后来我不得不显示一些博客表,如下所示:
Blog Id | ... | Last Post | Most Viewed Post
----------------------------------------------
1 | ... | Something | Post 1
1 | ... | Something | Post 10
1 | ... | Something | Post 5
1 | ... | Something | Post 4
并仅使用,并将List of Posts
其他字段作为 中的属性,Blog
从, ETC。)List of Posts
Last Post
Most Viewed Post
我正在使用NHibernate
with Active Record
withMySQL
以防万一。