doctrine - Symfony - StateFieldPathExpression or SingleValuedAssociationField expected -


i use query builder of symfony , have query:

->select('partial detail.{id}') ->from('shopware\models\article\detail', 'detail') ->innerjoin('detail.attribute', 'attr') ->leftjoin('detail.article', 'article') 

now have custom model outside of scope following relation:

class supplier {     /**      * @var \shopware\models\article\supplier      * @orm\manytomany(targetentity="\shopware\models\article\supplier")      * @orm\jointable(name="fp_demand_planning_supplier_manufacturers", joincolumns={@orm\joincolumn(name="supplier_id", referencedcolumnname="id")}, inversejoincolumns={@orm\joincolumn(name="manufacturer_id", referencedcolumnname="id", unique=true)})      */     private $manufacturers; 

on article side model \shopware\models\article\supplier stored in article.supplier.

so want join custom model query above follows:

->select('partial detail.{id}') ->from('shopware\models\article\detail', 'detail') ->innerjoin('detail.attribute', 'attr') ->leftjoin('detail.article', 'article') ->innerjoin('fpdemandplanning\models\supplier', 'fps', 'with', 'article.supplier = fps.manufacturers'); 

here error:

206 near 'manufacturers': error: invalid pathexpression. statefieldpathexpression or singlevaluedassociationfield expected.  

i tried way:

->innerjoin('fpdemandplanning\models\supplier', 'fps', 'with', 'article.supplier in (fps.manufacturers)'); 

but error:

[syntax error] line 0, col 216: error: expected literal, got 'fpsupplier' in 

does know how can join custom model has many many relation here?

thanks!


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -