You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I come forward with an issue I mentioned on Slack a couple of days ago.
When setting up relations through virtual fields, using the function cast() leaves them as they are and you end up with something that looks like this:
If your virtual function returns an instance of Cortex or CortexCollection, I think it would be desirable to see them get cast when casting the model, just like regular relations are.
An example of a use case would be a virtual field for unpaid invoices from a client. This cannot be setup in the fieldConf as you don't want to get all invoices regardless of status, only the unpaid ones.
Here's a small repo (I made it as concise as possible) that reproduces the error, should you need it.
The text was updated successfully, but these errors were encountered:
I come forward with an issue I mentioned on Slack a couple of days ago.
When setting up relations through virtual fields, using the function
cast()
leaves them as they are and you end up with something that looks like this:If your virtual function returns an instance of
Cortex
orCortexCollection
, I think it would be desirable to see them get cast when casting the model, just like regular relations are.An example of a use case would be a virtual field for unpaid invoices from a client. This cannot be setup in the
fieldConf
as you don't want to get all invoices regardless of status, only the unpaid ones.Here's a small repo (I made it as concise as possible) that reproduces the error, should you need it.
The text was updated successfully, but these errors were encountered: