Declaration of dependencies for certain subtypes only

Description

See ,

Essentially, sometimes people write bridges that include casts. Those bridge access properties that are not declared on the type to which the binder is applied, and thus there is currently no way to declare dependencies to those properties, except through hacks.

It would be nice to provide a way to declare dependencies that apply to certain subtypes only; essentially dependencies that include casts.

Something like this:

But maybe it would be more future-proof to just include the concept of casts in PojoModelPath, so that we can introduce casts at any point in a given path?

The challenges here will be to:

  • Represent casts in PojoModelPath, probably by adding a new kind of node.

  • Handle casts everywhere we currently process a PojoModelPath.

  • Find a good syntax for these casts in PojoModelPath#parse.

Implementing support for polymorphic dependencies might not be too hard, as we already have some support for that (PojoIndexingDependencyCollectorPolymorphicDirectValueNode, for example). Not sure it’s completely relevant, though.

Activity

Show:

Details

Assignee

Reporter

Components

Priority

Created February 21, 2022 at 12:45 PM
Updated September 25, 2023 at 3:51 PM