Type cast in include expression

#1

I need to cast type FixedAsset into a Facility type in an include expression.

I need to access field facilityType in Facility starting from a MeterAsset. This is what I’m trying to do:

c3Grid(MeterAsset.fetch({include: 'parent.(Facility).facilityType'}))

But it’s not working, nothing is returned in the parent field!

How could I cast types in include in an expression?

0 Likes

#2

This is simply not supported at this time. For now, the only thing you can do is make the dot query use the startsWith() function and the appropriate type_ident).

1 Like