i have two tables:
- Components
- ComponentDependencies
ComponentDependencies has two columns: ComponentId and ComponentDependencyID. (both foreign keys into Id field of Component table.
i am using fluent nhiberate and i have my 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 object, i can see a list of its dependencies.
Is there anyway i can have an additional property have the "reverse" list. What i mean is that i want a property called "DependentOf" which is also a
IList<ComponentDependency>
which has all of the items where this current component is the dependent component in the relationship?