quick
quick copied to clipboard
[Quick 7] Casts No Longer Work With Discriminated Entities
I discovered an issue when playing around with discriminated entities where casts no longer work, specifically the JsonCast@quick.
If I assemble the entity like this, casts work:
component
extends="quick.models.BaseEntity"
accessors="true"
table="MaintenanceTask"
{
property name="data" casts="JsonCast@quick";
Output: "data":{"rowsDeleted":0,"targetDate":"June, 25 2023 13:15:59"}
If I assemble the root entity like this, casts don't work:
component
extends="quick.models.BaseEntity"
accessors="true"
table="MaintenanceTask"
discriminatorColumn="name"
singleTableInheritance="true"
{
property name="data" casts="JsonCast@quick";
Output: "data":"{\"rowsDeleted\":0,\"targetDate\":\"June, 25 2023 13:17:27\"}"
Note: I tested this issue all the way back to Quick 5 and can replicate it.