-
-
Notifications
You must be signed in to change notification settings - Fork 960
Open
Description
Description
I am trying to create a subresource operation that looks as follows:
new Post(
uriTemplate: '/users/{userId}/attendances',
uriVariables: [
'userId' => new Link(
toProperty: 'user',
fromClass: UserEntity::class,
),
],
input: CreateAttendanceDto::class,
processor: AttendancePostProcessor::class,
stateOptions: new Options(entityClass: AttendanceEntity::class)
),The issue that I'm running into is that my user can have many attendances. Calling the endpoint will result in the database querying for ANY attendance belonging to the user ID provided. This results in always getting the same attendance entity back if one already exists for that user. Basically eliminating what a POST endpoint should do (create a new object).
I am not too sure if this is behaviour that was implemented intentionally or a bug.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels