Skip to content

fix(state): do not map to input class in ObjectMapperProvider#7892

Merged
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix-input-mapping
Mar 29, 2026
Merged

fix(state): do not map to input class in ObjectMapperProvider#7892
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix-input-mapping

Conversation

@soyuka
Copy link
Copy Markdown
Member

@soyuka soyuka commented Mar 28, 2026

Q A
Branch? 4.2
Tickets Closes #7886
License MIT
Doc PR

ObjectMapperProvider was mapping Entity → InputDto on PATCH operations, pre-filling all DTO properties and causing validation failures on fields the client didn't send. The provider should only map to output class or resource class, never to input class.

@soyuka soyuka force-pushed the fix-input-mapping branch from 08db14c to e73448b Compare March 28, 2026 16:14
| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Tickets       | Closes api-platform#7886
| License       | MIT
| Doc PR        | ∅

ObjectMapperProvider was mapping Entity → InputDto on PATCH operations,
pre-filling all DTO properties and causing validation failures on
fields the client didn't send. The provider should only map to
output class or resource class, never to input class.
@soyuka soyuka force-pushed the fix-input-mapping branch from e73448b to 0d3ce40 Compare March 29, 2026 06:40
@soyuka soyuka merged commit 8cb5a60 into api-platform:4.2 Mar 29, 2026
150 checks passed
@soyuka soyuka deleted the fix-input-mapping branch March 29, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant