Skip to content
Discussion options

You must be logged in to vote

Hi @DrPowerSlam,

You've identified a legitimate design limitation in the current implementation. You're correct that the column field inside HAS conditions uses the parent model's column enum rather than the related model's enum.

Why this happens:

In WhereConditionsServiceProvider::createHasConditionsInputType(), the condition field recursively references the same parent input type:

condition: {$name}  // Uses the parent WHERE input type

This means for your query, the HAS condition's column field is typed as DriverColumn, even though you're actually filtering the employees relation.

Current workaround:

Don't specify columnsEnum (or columns) on the directive. This makes the column field ac…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DrPowerSlam
Comment options

Answer selected by DrPowerSlam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants