Skip to content

Question: why did you move away from separate Doctrine Post entity? #4

@alleknalle

Description

@alleknalle

Question: why did you move away from separate Doctrine Post entity?

Commit: 7a339cb

In your readme you state that there should be a separate Post entity in Infrastructure, but in the above mentioned commit you moved away from that. My question is why?

I'm struggling with Doctrine sometimes when I try to go DDD and hexagonal, because in my entities I use value objects all the time. Doctrine can't handle nullable properties when there is a value object, because when hydrating the entity, it then hydrates the value object with null value instead of making the property in the entity null.
Also, when working with relations, you need to use Doctrine Collection in your entities, which I think breaks DDD and hexagonal, because your using external code in your domain layer.

Could you share your opinion on this?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions