Doctrine tries to persist virtual roles - inject roles to token instead of user

Description

Steps

Add a new workflow with at least one status and choose some groups for the first status

Exception

A new entity was found through the relationship 'Integrated\Bundle\UserBundle\Model\User#roles' that was not configured to cascade persist operations for entity: ID:
Role: ROLE_SCOPE_INTEGRATED
Hidden: FALSE
Label:
Description: . To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}).

Solution

Try to inject the ROLE_SCOPE_INTEGRATED to the token instead of the user.

Environment

None

Deployment actions

None

Technical tasks

Inject ROLE_SCOPE_INTEGRATED to the token instead of the user

Status

Assignee

Unassigned

Reporter

Integrated Marijn

Client

Integrated Marijn

External issue ID

None

Follow up date

None

Code reviewer

Michael Jongman

Developer

Ger Jan van den Bosch

Plan date

None

Max. hours

10

Error message

None

Min. hours

8

Product owner

Marijn Otte

Refiner

Marijn Otte

Switches

None

Dev hour estimate

None

Story Points

2

Time tracking

8h 15m

Epic Link

Sprint

None

Fix versions

Priority

Major
Configure