l3pp4rd/DoctrineExtensions — Issue #239: Multilevel inherited tree
Author: szjani
Created: 2012-01-23 09:54:45+00:00
State: open

Previously I had reported a bug, which has been solved (https://github.com/l3pp4rd/DoctrineExtensions/issues/12).
Now I need to extend the user class. I created the following class:

```php
namespace entities;

/**
* @Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
* @Table(name="`user_ldap`")
*/
class UserLDAP extends User {

public function __construct($ldapUserName) {
parent::__construct(md5(mt_rand() . time()) . '@something.com', 'pass');
}

}
```
When I create and insert a User object, the tree is fine, but if I create a UserLDAP object, inside nodes' left and right values won't be modified. Of course I have added the new class to the descriminatormap in class Role.