Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Readonly column property for generated/virtual columns #5728
MySQL and MariaDB both support virtual/computed/generated columns.
More info on these columns:
This seems to support an edge-case scenario that is DB-specific. Any reason why you can't simply skip mapping those fields?
In addition to that, userland object implementations may still overwrite those field values, leading to out-of-sync db and object model. In addition to that a full entity refresh should be forced if one of those fields is computed.
I think the resolution for this issue is as simple as "don't map it", which will lead the ORM to completely ignore the field anyway.
Tossing in my