I have an object which has a circular reference to another object. Given the relationship between these objects this is the right design.
To Illustrate
I've had the same problem this week as well, and could not use anonymous types because I needed to implement an interface asking for a List
. After making a diagram showing all relationships with navigability, I found out that MyType
had a bidirectional relationship with MyObject
which caused this circular reference, since they both saved each other.
After deciding that MyObject
did not really need to know MyType
, and thereby making it a unidirectional relationship this problem was solved.