Closed jplanginier closed 7 years ago
I was able to find the solution alone in the end. For those who would encounter the same problem :
Most of the official doc use nested strategy as the example, then they add the required fields for that strategy. For MaterializedPath, the only fields which are necessary are $lvl, $title, $path, $parent and $children, Any other like $root, $lft, and so on will only prevent the listener from working, then it will cause error on SQL query.
Hi I saw that you had a similar problem like me with tree doctrine extension. I opened new issue with title: This repository can be attached only to ODM MongoDB tree listener can I ask you to look and give me your opinion?
I found that I have to call the event manager and passed to entity manager constructor.
Regards
Hi, I'm having a problem, as I'm using the extension to use the tree doctrine extension. I have the Tree working fine in database, yet I can't active the Listener, resulting in the common "Integrity constraint violation: 1048 Column 'lft' cannot be null" error. Problem is, all the answer for that error is to enable the Listener in the config.yml, which I did. For the record, here are the relevant parts of my config.yml
What else could block the listiner from triggering please ? I'm using an entity with materializedpath strategy, on which I did put the MaterializedPathRepository.
The only "exotic" thing that could happen with that Entity is that it is my User class which extends FOSUser, but the updateUser function I use does persist and then flush the entity. So, there is no reason for the event listener not to work on the entity before it goes to the DB ?
Thank you for your time and answers !