An error will occur if you try to get the parent of the object, if in fact it does not have a parent. Everything that you indicated is fine, and I have repeatedly applied this kind of relationship.
You mentioned the exception, but did not mention when this will happen. During the upgrade? Perhaps there is a violation of FC? During INsert? Or just a request?
Task.Parent.Parent.Parent.Parent is not something you can just do endlessly. Of course, it compiles, the code does not know that there is data supporting this operator. But at runtime, each .Parent call must be matched by an equivalent ParentID column.
source
share