[FLOW3-general] Many to Many Relation with Duplicates

Karsten Dambekalns karsten at typo3.org
Tue Jan 10 10:13:17 CET 2012


Hi Jeff & Christian.

On 08.01.12 15:56, Jeff Segars wrote:
>> as for the ManyToMany the described behaviour is correct, but doctrine
>> shouldn't set a unique contraint on the columns so that multiple entries
>> with the same keys should be possible and so quantities should be
>> working. If not it's a bug for me (either in our implementation or in
>> doctrine, that would have to be checked).
> 
> Here's what I get as the primary key in all my MM tables. Note the
> composite primary key...

Yes, there are two unique instances and they are connected. You don't
really want to have duplicate entries, but a count - which needs a
container object. I think no one on the Doctrine side will agree on this
being a bug.

Think of it in terms of PHP code, how would you solve this? Would you
really put 5 items into a basket, or would you use 1 and a count field?

Regards,
Karsten


More information about the FLOW3-general mailing list