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
Post a Comment