Skip to content

Associating many-to-one records only goes half way #9

@mattsah

Description

@mattsah

In 954c7b2 the ability was added to associateRelatedRecord in a many-to-one relationship such that you could do something like:

$bookmark->associateUser($user);
$bookmark->createUser();

And the result of createUser() would be the associated record. However, since the associate functionality also attempts to flag records to be updated in the DB and this is more complex logic, a deicsion was made not to have the associate handled when $bookmark->store() is called, so it is flagged not to update.

It would be nice if that logic could be added so that a separate call to $bookmark->setUser($user->getId()) need not be called to actually ensure the association is stored.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions