Alex Rivera | Logout

How to solve circular reference?

Asked 2011-08-03T14:48:50.300
37

How do you solve circular reference problems like Class A has class B as one of its properties, while Class B has Class A as one of its properties?

How to do architect for those kind of problems?

If you take an example of NHibernate, there will be a parent-child relationship between objects.

How is it able to handle those parent child scenarios?

Edit
Report

1 Answer

7

I would tell your friend he needs to rethink his design. Circular references like you describe are often a code smell of a design flaw.

answered 2011-08-03T14:51:01.830

Your Answer