Added failing test for hierarchy save

I got stuck while saving a hierarchy of entities which are using a parent pointer. A failing unit test is attached as pull request. Could you help me out with this? Am I defining the hierarchy wrong, or is it really something that won't work with GraphDiff?