Skip Menu |

This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id: 124501
Status: new
Priority: 0/
Queue: DBIx-Class

Owner: Nobody in particular
Requestors: silby [...]
tsibley [...]

Bug Information
Severity: Important
Broken in: 0.082841
Fixed in: (no value)

Subject: Implementation of add_to_foo method for many-to-many relationships is dangerous
Download (untitled) / with headers
text/plain 686b
The implementation¹ of the add_to_foo method for many-to-many relationships is dangerous, as it performs a find_or_create when given a hashref instead of just a create like the add_to_foo methods of other relationships. The documentation² indicates that it should be just a create. Even if this is the desired behaviour and the documentation needs updating, that find_or_create is located in a place where it's impossible to pass in a second argument to specify a unique constraint to use for find. ¹ ²$rel

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to