-
-
Notifications
You must be signed in to change notification settings - Fork 965
Serializing process doesn't support indexBy
with association
#504
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
Comments
Also, it doesn't support In the same example, if I set class User
{
/**
* @ORM\OneToMany(targetEntity="ExtraInfo", mappedBy="user", indexBy="field_id")
*/
private $extra_infos;
...
} |
We have a test case with id on associations and it should work. |
@soyuka Thank you. I found |
@soyuka I've |
Check in the |
@soyuka I tested around and it gets problematic when I put class User
{
/**
* @ORM\OneToMany(targetEntity="ExtraInfo", mappedBy="user", indexBy="field_id")
*/
private $extra_infos;
...
} If I remove |
indexBy
with association
Can we get a bit more detailed stack trace on this error? Thanks! |
@soyuka Here it is.
|
I didn't know Github has fixed max width of a line. I tested putting the trace into Gist, but it didn't work, either. :/ |
Any advice? |
It's really weird that |
The property is private and I have getter, |
I totally agree that it's really weird. |
Nope that's fine. ExtraInfo is also an entity? |
Yes, it's also an entity. |
This should be updated when the symfony's PR will be merged ;). |
symfony/symfony
:v3.4.2
doctrine/orm
:v2.5.14
api-platform/core
:v2.1.4
Hello, I have a structure like following:
In such case, API-Platform shows only
ExtraInfo->user
as the id ofExtraInfo
. It doesn't showExtraInfo->field
as its id.The text was updated successfully, but these errors were encountered: