Should I create a module for the LinkPartnerService table? (which
contains the relation between partners and services?)

Thx!

On máj. 4, 13:37, saki <sakrame...@gmail.com> wrote:
> Hi!
>
> Please to help me to solve this... There are partners (firms).
> Partners have services. Services have notes. Partners - Services using
> M-M relation, it works fine! I added embed forms to the service page
> to include the note forms. Still works fine. I added a service and
> partner field to the note table, it stores the id of the service and
> the partner. Everything works fine, I can save/edit note forms, it
> saves the id of the service and the partner, too.
>
> Now, I want to see the notes of a service(#1) which belongs to partner
> #2.
> URL: /service/nomatters/id/1/partner/2
>
> However it only shows the notes of the service. It DOES NOT deal with
> the partner. Perhaps the relations are not correct in my schema. I
> don't know how to solve this... Please help! I used: $this-
>
> >embedRelation('Notes');
>
> Service:
>   columns:
>     name: { type: string(255) }
>   relations:
>     partners: { onDelete: CASCADE, class: Partner, refClass:
> LinkPartnerService, local: service_id, foreign: partner_id }
>
> ServiceNote:
>   actAs: { Timestampable: ~ }
>   columns:
>     service: { type: integer, notnull: false }
>     partner: { type: integer, notnull: false }
>     name: { type: string(255) }
>     note: { type: text }
>   relations:
>     Service:
>       alias:        Service
>       foreignType:  many
>       foreignAlias: Notes
>       onDelete:     cascade
>       local:        service
>       foreign:      id
>     Partner:
>       onDelete: SET NULL
>       local: partner
>       foreign: id
>
> Thank you so much!
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to