If you include additional fields in the association (storing actual data),
then it is no association anymore. You will need to explode that into a
"join-entity" like following:

A -1:n-> AB <-m:1- B

Where AB is an actual entity. See
http://stackoverflow.com/questions/15616157/doctrine-2-and-many-to-many-link-table-with-an-extra-fieldfor
additional details

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 18 December 2013 16:10, Diego Perlman <[email protected]> wrote:

> I have a MANY-TO-MANY relationship.
>
> It works fine, but now I have to include a FIELD to keep an order.
>
> I have this:
>
> <many-to-many field="purchaseorders" target-entity="PurchaseOrder"
> inversed-by="commercialinvoices">
>
>             <join-table name="commercialinvoicepurchaseorder">
>
>                 <join-columns>
>
>                 <join-column name="commercialinvoice_id"
> referenced-column-name="id"></join-column>
>
>                 </join-columns>
>
>                 <inverse-join-columns>
>
>                 <join-column name="purchaseorder_id"
> referenced-column-name="id"></join-column>
>
>                 </inverse-join-columns>
>
>             </join-table>
>
>         </many-to-many>
>
> I want to ORDER the INSERT, If I insert 99,213,98 I want to keep this
> order but in MYSQL it stores like 98,99,213 so that's why I need
> another FIELD in the relationship to control de ORDER.
>
> Someone can help me with this?
>
> Regards
> Diego
>
> --
> You received this message because you are subscribed to the Google Groups
> "doctrine-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/doctrine-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to