Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quick 7] Casts No Longer Work With Discriminated Entities #233

Open
homestar9 opened this issue Jul 25, 2023 · 2 comments
Open

[Quick 7] Casts No Longer Work With Discriminated Entities #233

homestar9 opened this issue Jul 25, 2023 · 2 comments
Milestone

Comments

@homestar9
Copy link
Contributor

homestar9 commented Jul 25, 2023

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.

@bdw429s
Copy link

bdw429s commented Jul 25, 2023

This issue has been mentioned on Ortus Solutions Community. There might be relevant details there:

https://community.ortussolutions.com/t/using-discriminated-entities-when-the-base-class-has-no-knowledge-of-child-classes/9728/6

@bdw429s
Copy link

bdw429s commented Apr 29, 2024

This issue has been mentioned on Ortus Solutions Community. There might be relevant details there:

https://community.ortussolutions.com/t/using-discriminated-entities-when-the-base-class-has-no-knowledge-of-child-classes/9728/8

@elpete elpete added this to the v9.0.0 milestone May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants