Bug #13634

Wrong SQL statement in \F3\Persistence\Backend\GenericPdo\Backend.php

Added by Regine Rosewich over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:2011-03-04
Priority:Must have Due date:
Assigned To:Karsten Dambekalns % Done:

0%

Category:Persistence
Target version:-
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

Hi guys,

upon testing the blog example, I found a wrong SQL-statement generated in the above mentioned class.

/**
$sql['tables'][] = '"entities" AS "_entity", "properties_data" AS "d"';
*/
$sql['tables'][] = '"properties_data" AS "d", "entities" AS "_entity"';

The commented line contains the wrong code throwing a SQL-Error.

Hope it helps.

Regine

History

#1 Updated by Regine Rosewich over 4 years ago

I forgot to give the line-number of the wrong code.

Its 637 in \F3\Persistence\Backend\GenericPdo\Backend.php

#2 Updated by Alexander Stehlik over 4 years ago

I should have looked in the bug tracker earlier, I spent hours with this issue.

Anyway, thanks a lot for sharing!!

#3 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from New to Needs Feedback
  • Assigned To set to Karsten Dambekalns

Well, sematically that should be the same, no? What error does this cause, and under which circumstances?

#4 Updated by Regine Rosewich over 4 years ago

In the meantime I use the Doctrine2 persistence, so the error will not happen any more. But as far as I remember it happend, when trying to add a new post to the blog-example without Doctrine2 Persistence.

I dumped the SQL-Statement with a \F3\var_dump() in Backend.php, cut it out and pasted it into the SQL-editor of PhpMyAdmin. There it threw the same error as in FLOW3.

When changing the syntax as shown in my issue, the error was gone.

#5 Updated by Karsten Dambekalns over 4 years ago

  • Status changed from Needs Feedback to Closed

Too little information, cannot reproduce.

Also available in: Atom PDF