error while trying to move a node - You can't specify target table 'phpcr_nodes' for update in FROM clause

19 views
Skip to first unread message

Laurentiu C

unread,
Feb 2, 2016, 5:18:28 PM2/2/16
to Jackalope
Hello, 

I'm having this issue while moving a node in phpcr (symfony + doctrine). I've updated to the last issue but doesn't seems to fix it. 
This is a MySQL restriction and even if there are aliases and subqueries in that big update query still an error appears. Any workaround / fix for it?  

error: 1093 You can't specify target table 'phpcr_nodes' for update in FROM clause

thank you 

Lukas Kahwe Smith

unread,
Feb 3, 2016, 9:18:57 AM2/3/16
to Laurentiu C, Jackalope
Aloha,


I have not seen this error ..

which version of Jackalope Doctrine DBAL are you using and which version of MySQL?

regards,
Lukas Kahwe Smith



signature.asc

Laurentiu

unread,
Feb 3, 2016, 9:23:36 AM2/3/16
to Lukas Kahwe Smith, Jackalope
Hello, 

Thank you for looking into this. 

here is an extras from my composer:

"jackalope/jackalope-doctrine-dbal": "1.2.*",
"doctrine/phpcr-bundle": "1.2.*",
"doctrine/phpcr-odm": "1.3.0",

used to have:

"jackalope/jackalope-doctrine-dbal": "1.1.*",
"doctrine/phpcr-bundle": "1.1.*",
"doctrine/phpcr-odm": "1.2.0",

and MySQL version is: 

5.7.9
MySQL Community Server

In production there is lower version of MySQL version. 

Thanks,
/laurentiu
signature.asc

Lukas Kahwe Smith

unread,
Feb 3, 2016, 9:26:43 AM2/3/16
to Laurentiu, Jackalope
did you manage to isolate which method is generating the problematic query and/or what operation is triggering it?
signature.asc

Laurentiu Ciovica

unread,
Feb 3, 2016, 9:37:10 AM2/3/16
to Lukas Kahwe Smith, Jackalope
Background: the nodes are cms pages. Each of them have the "slug" as being the nodename property. When you try to change the slug of that page, it performs a "move" of that node from the old location to the new along with any children that that page may have. here is screenshot with what symfony returns back. does it help? 
I was thinking to make a workaround to clone the page and move "by hand" all its possible children to the clone after which I've removed the old version - but's an expensive operation. thanks

Inline image 1

Lukas Kahwe Smith

unread,
Feb 8, 2016, 6:31:09 AM2/8/16
to Laurentiu Ciovica, Jackalope
On 03 Feb 2016, at 15:36, Laurentiu Ciovica <laurenti...@gmail.com> wrote:

Background: the nodes are cms pages. Each of them have the "slug" as being the nodename property. When you try to change the slug of that page, it performs a "move" of that node from the old location to the new along with any children that that page may have. here is screenshot with what symfony returns back. does it help? 
I was thinking to make a workaround to clone the page and move "by hand" all its possible children to the clone after which I've removed the old version - but's an expensive operation. thanks

<Travel_Planner.png>
signature.asc
Reply all
Reply to author
Forward
0 new messages