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
If I get a second tonight, I'll try coding it out to confirm. But off the top of my head, the reset_password.yaml file wouldn't change if you wanted to use multiple user entities. It just needs to know what repository to use for the ResetPasswordRequest entity. Which there should only be 1 of those.
#126
Closed
alexis78-sym opened this issue
Jul 31, 2020
· 0 comments
If I get a second tonight, I'll try coding it out to confirm. But off the top of my head, the reset_password.yaml file wouldn't change if you wanted to use multiple user entities. It just needs to know what repository to use for the ResetPasswordRequest entity. Which there should only be 1 of those.
What would change would be the Entity\ResetPasswordRequest::user Doctrine Annotation. make:reset-password does something like @ORM\ManyToOne(targetEntity="App\Entity\User") for that property.
If you have multiple entities, you couldn't use a ManyToOne relation. Knee jerk thinking would be the request entity would need a new property(ies) to track which user "type" (entity) and the id of the user. Then in the request repository, you would use the new properties to fetch and set Entity\ResetPasswordRequest::user with the correct user entity before returning the Entity\ResetPasswordRequest::class to the consumer.
If I get a second tonight, I'll try coding it out to confirm. But off the top of my head, the
reset_password.yaml
file wouldn't change if you wanted to use multiple user entities. It just needs to know what repository to use for theResetPasswordRequest
entity. Which there should only be 1 of those.What would change would be the
Entity\ResetPasswordRequest::user
Doctrine Annotation.make:reset-password
does something like@ORM\ManyToOne(targetEntity="App\Entity\User")
for that property.If you have multiple entities, you couldn't use a
ManyToOne
relation. Knee jerk thinking would be the request entity would need a new property(ies) to track which user "type" (entity) and the id of the user. Then in the request repository, you would use the new properties to fetch and setEntity\ResetPasswordRequest::user
with the correct user entity before returning theEntity\ResetPasswordRequest::class
to the consumer.Originally posted by @jrushlow in #110 (comment)
The text was updated successfully, but these errors were encountered: