You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Right now it's not possibile to create entities with dependencies. It's possibile to use the Instantatior but it's not aware of data on creation, so it's not possible if you have something like this:
Of course we could instantiate the entity with an empty string, but it's not the right way and things will be more complicated when a dependecy is needed (imagine a Role).
Should be useful another event that will allow to create entity based on POST data.
The text was updated successfully, but these errors were encountered:
You can create your own type of instantiator called an Entity Factory to create your entities. If you create a proper Entity Factory it will have access to the request or whatever else you inject it with.
It will be up to you to configure your Entity Factory. If you need to fetch filtered data you'll probably have to fetch it explicitly in your factory rather than waiting for it to roll around to the resource method.
This repository has been closed and moved to laminas-api-tools/api-tools-doctrine; a new issue has been opened at laminas-api-tools/api-tools-doctrine#2.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now it's not possibile to create entities with dependencies. It's possibile to use the
Instantatior
but it's not aware of data on creation, so it's not possible if you have something like this:Of course we could instantiate the entity with an empty string, but it's not the right way and things will be more complicated when a dependecy is needed (imagine a
Role
).Should be useful another event that will allow to create entity based on POST data.
The text was updated successfully, but these errors were encountered: