Skip to content

Manager try to update an object if a no-managed attribute is changed #5

@Titou74

Description

@Titou74

What I try to do
Having on a same object some managed attributes and no-managed attributes, for example

/**
 * @ORM_Column_Type smallint
 * @ORM_Column_Null NOT NULL
 */
protected $userId;

/**
 * @var Users
 */
protected $user;

Because there is non relation yet, I set $user after my entity loaded from the DB.

What don't work
When I change a no-managed attribute and I make an make an $orm->flush(), it try to update the database. Because there is no modification on my managed attributes, nothing change on DB and it cause 'Failed to update one or more records in the database.' exception.

What it should be done
The TrackedCollection should only compare the "UnkeyedValues"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions