开发者

Fluent NHibernate - Unidirectional Mapping Between Parent and Children

开发者 https://www.devze.com 2023-03-12 16:32 出处:网络
Is it possible to pass a reference at load time of a parent to it开发者_StackOverflow社区\'s children without a relationship back to the parent from the child?

Is it possible to pass a reference at load time of a parent to it开发者_StackOverflow社区's children without a relationship back to the parent from the child?

I would prefer to NOT have a mapped property for this purpose (i.e. prefer not to use bi-directional relationships for this purpose).


You could probably do it with a linking table but you'd have to enforce one-to-many via code otherwise it could easily become a many-to-many. The jist of the linking table would be that it keeps the association between the parent and its children, rather than the child object itself.

0

精彩评论

暂无评论...
验证码 换一张
取 消