symfony - Ordered Many-to-many -


is there elegant way in symfony modelize many-to-many relation additionnal field for total order ? understand why 1 needs create additionnal entity relations attributes, here 'position' included in classic arraycollection of classic many-to-many relation, position in array corresponding position attribute.

thanks

it's more of doctrine question symfony question answer can found here. in short, have add @orderby mapping field, so:

class foo {     /**      * @orm\manytomany(targetentity="bar")      * @orm\orderby({"position" = "asc"})      */     protected $bar; } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -