Open Arkemlar opened 8 years ago
That's a Propel, not the sfPropelORMPlugin bug. But Propel should be BC too.
You excluded the excess text, so let me ask you about this part:
shop_product.VISIBLE, FROM INNER JOIN
Is the comma really between VISIBLE and FROM in generated query?
What's the schema for those tables, especially ShopProduct, to reproduce the issue?
In some cases new Propel version is generating wrong queries with omitted table name in FROM statement. Someone in stackoverflow said that in new propel version the right way to build queries is to use Queries, but as in main page mentioned, sfPropelORMPlugin fully supports BC. So I assume this as bug. Example:
Error text:
Unable to execute SELECT statement [SELECT DISTINCT shop_product.ID, shop_product.PARENT_ID, shop_product.RUBRIC_ID, <I excluded excess text>, shop_product.VISIBLE, FROM INNER JOIN
shop_productON (shop_product2shop_rubric.PRODUCT_ID=shop_product.ID) INNER JOIN
shop_rubricON (shop_product2shop_rubric.RUBRIC_ID=shop_rubric.ID) WHERE (shop_rubric.PARENT_ID IN (:p1) OR shop_rubric.ID IN (:p2)) AND shop_product.VISIBLE=:p3 AND shop_product.WAREHOUSE>:p4 ORDER BY RAND() DESC LIMIT 6] [wrapped: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN
shop_productON (shop_product2shop_rubric.PRODUCT_ID=shop_product.I' at line 1]