Skip to content

Revise PredicateSpecification for improved reuse #4035

@mp911de

Description

@mp911de

Based on demand to allow composition of specifications across various input types (joins, embeddables) and types of the entity type hierarchy, there's a limitation on how far we can support these cases with Specification. We however have PredicateSpecification that is meant for composition but its current signature requires Root<T>. We've been asked to accept From instead. From defines source and target types that interfere with our type assumption T.

We have the options to either drop the type or pin it to From<?, T>. Introducing another type parameter for the source type seems not ideal.

So we would apply the type T for PredicateSpecification to the From<?, T> target type. While implementations lose the source type information, they benefit from a wider range or accepting joins and embeddable types.

References:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions