I have the followin domain objects:
public class Case {
public virtual Event {get; set;}
}
public class Event {
public virtual Case {get;set; }
}
I'm using Fluent for mappings.
At the moment I'm using a standard References mapping from the Case side:
References(x => x.Event).Unique();
But I'm at a loss what to do on the other side.
The main problem I have is that I want to perform searches for both cases and events and be able to sort and filter on the related case and events respectively. In order to do that I need to map the relation from both sides right?
I know I could use a HasMany relation on the event side, but then I'd have to change the property to a list or some other collection and I don't really want to do that.
But my question is, isn't there a better more standard way of doing it? Regular 1-to-1 relations doesn't seem to fit the bill since they seem to mandate that you have a common Id.
Grateful for any tips or pointers!