I have two tables:
- Components
- ComponentDependencies
ComponentDependencies has two columns: ComponentId and ComponentDependencyID . (both foreign keys in the Id field of the Component table .
I am using fluent nhiberate and I have a component object having:
public virtual IList<ComponentDependency> Dependencies { get; set; }
and in my ComponentMap class I have nhibernate map:
HasMany(x => x.Dependencies)
.AsBag().Inverse();
So, when I have a component, I can see a list of its dependencies.
In any case, I may have an additional property that has a list of "reverse". I mean, I want a property called DependentOf, which is also
IList<ComponentDependency>
, ?