-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Document proper usage of toMany collections (denormalization + validation) #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
Labels
Comments
Accessor must call public function getFoo(): array
{
return $this->foos->getValues();
} validation: <property name="foos">
<constraint name="Valid"/>
</property> with <getter property="foos">
<constraint name="Valid"/>
</getter> or the equivalent if you are using yaml/annotations. |
#740 finally took time to document that :D |
soyuka
added a commit
to soyuka/doc
that referenced
this issue
Feb 20, 2019
soyuka
added a commit
to soyuka/doc
that referenced
this issue
Feb 20, 2019
soyuka
added a commit
that referenced
this issue
Feb 20, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See api-platform/core#1534
@bendavies what's the validation trick? Put the validation on the property instead of the getter?
The text was updated successfully, but these errors were encountered: