@blakeyrat said in How do I Simplify Parent to Child Reads When Representing Inheritance Using a Table-Per-Type Schema:
@captainpants said in How do I Simplify Parent to Child Reads When Representing Inheritance Using a Table-Per-Type Schema:
To be honest I'm not 100% married to the idea of Table-per-Type. If it causes too many headaches we'll just do Table-per-Hierarchy and live with most columns of a single table being nullable.
Ok, hang on. Maybe I'm asking the wrong question.
Is this greenfield development?
In your original question, you said it was an already-existing system, and I was trying to work out how you were storing this data on disk now. After this reply, I'm starting to think this is greenfield. Now I'm just confused.
It's greenfield development. All we're doing with the existing system is importing its data into the new system's DB schema.
@blakeyrat said in How do I Simplify Parent to Child Reads When Representing Inheritance Using a Table-Per-Type Schema:
@captainpants said in How do I Simplify Parent to Child Reads When Representing Inheritance Using a Table-Per-Type Schema:
Joining down is what I'm interested in.
Sure there might be ways to go the other direction, but why would you bother?
We would need to bother to do that in the case of Users. Laravel can load a user instance of the current user that's browsing our system. However, depending on if that user is a Student or Educator, they would have the ability to do different things.