-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something wrong with relations #516
Comments
I'm also having the same issue.
Using the swagger docs I've manually created some
However if I go into the admin and go to edit If I just change the name of the Prize then the PUT request to the API is correct.
If I touch the
|
I have the same problem for all ManyToOne relations. There shall be SELECT to pick one relation. There is an interface to assign multiple values. |
PHP: 8.2
Symfony: ^6
Api platform: ^3.2
Admin api platform: ^3.4.4
I created entity ProposalType.php
And another entity ProposalParam.php
This is pretty simple ManyToOne relation. Generated by make:entity. I'm dont modified this.
Wanted that ProposalParam entity has ProposalType entity by relation, it is simple.
I can create ProposalType via api platform with POST request to /api/proposal_types. And it is successfull.
Then i can set this ProposalType in ProposalParam via POST request to /api/proposal_types. And it is successfull.
Records are inside database and set up like needed.
When i go to admin panel and send request to create ProposalParam i can set ProposalType.
But request sends as array
And error occured Nested documents for attribute "proposalType" are not allowed. Use IRIs instead.
And this is expected, we send array, but api wants IRI.
App.js in admin pretty standart, do not modify something
Main goal is why system generate select where i need to specify array of ProposalTypes, instead of one ProposalType. Can someone help with it?
The text was updated successfully, but these errors were encountered: