Implemented Doctrine Tree behaviour.