Skip to content

make:entity repository add/remove method signature #1086

@JB-oclock

Description

@JB-oclock

Hi,

i'm happy to have this two new method: it's easier to use Repository than EntityManagerInterface in Controller.

But i'm not sure that the flush parameter with default value to true is a good choice.

public function add(<?= $entity_class_name ?> $entity, bool $flush = true): void

I see datamapper as a "transaction" use of the database, so using flush by default and not using "transaction" was not what i expect.

I just want to know your vision of the default value to true
This issue is more a discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions