I have 3 entities:
- EventCategoryPrivate
- EventPrivate
- EventStatusPrivate
I defined custom provider like this :
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/event/categories', provider: EventCategoryPrivateStateProvider::class)
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/events', provider: EventPrivateStateProvider::class)
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/event/statuses', provider: EventStatusPrivateStateProvider::class)
when i m requesting event statuses, it arrive in the EventPrivateStateProvider. It 's not normal, i should be in the EventStatusStateProvider. it consider like id and not get collection.
when i m requesting event category, it arrive in the EventCategoryStateProvider. It's normal.
I tested to change the name of entity EventStatusPrivate to EventCStatusPrivate to be before EventPrivate in the alphabetic order.
And now it s running when i m requesting i m in the EventStatusPrivateStateProvider.
Can you correct this bug ?
Mathieu
I have 3 entities:
I defined custom provider like this :
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/event/categories', provider: EventCategoryPrivateStateProvider::class)
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/events', provider: EventPrivateStateProvider::class)
#[ApiResource(normalizationContext: ['groups' => ['read']], routePrefix: '/v1/private', operations: [new GetCollection(uriTemplate: '/event/statuses', provider: EventStatusPrivateStateProvider::class)
when i m requesting event statuses, it arrive in the EventPrivateStateProvider. It 's not normal, i should be in the EventStatusStateProvider. it consider like id and not get collection.
when i m requesting event category, it arrive in the EventCategoryStateProvider. It's normal.
I tested to change the name of entity EventStatusPrivate to EventCStatusPrivate to be before EventPrivate in the alphabetic order.
And now it s running when i m requesting i m in the EventStatusPrivateStateProvider.
Can you correct this bug ?
Mathieu