doctrine / doctrine-laminas-hydrator

Doctrine hydrators for Laminas applications
https://www.doctrine-project.org/projects/doctrine-laminas-hydrator.html
MIT License
33 stars 19 forks source link

Support @Embedded #18

Closed quachvanhao2020 closed 3 years ago

quachvanhao2020 commented 3 years ago

Support @Embedded

TomHAnderson commented 3 years ago

Hello @quachvanhao2020 and thanks for contributing. Can you give more information about what your PR is for (MongoDB I would guess) and your ideas for unit testing your changes?

quachvanhao2020 commented 3 years ago

This Pr: The @embedded annotation doctrine is required on an entity's member variable, in order to specify that it is an embedded class The @embeddable annotation doctrine is required on a class, in order to make it embeddable inside an entity. It works together with the @Embedded annotation to establish the relationship between the two classes. support @embeddable and @embedded annotation hydrator

driehle commented 3 years ago

Indeed, the doctrine-laminas-hydrator does not support Doctrine Embeddables at the moment. I stumbled upon this in a couple of projects as well.

However, I think that there might be an easier solution to this and - most importantly - that unit tests should be added in this regard. From my perspective, I would make sense to merge #19 first though.