Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Join Condition Parsing Fails for Array Values (e.g. Date Ranges) #68

Open
ZaidMaslouhi opened this issue Dec 6, 2024 · 0 comments · Fixed by ZaidMaslouhi/dataui-nestjs-crud#2 · May be fixed by #69
Open

Join Condition Parsing Fails for Array Values (e.g. Date Ranges) #68

ZaidMaslouhi opened this issue Dec 6, 2024 · 0 comments · Fixed by ZaidMaslouhi/dataui-nestjs-crud#2 · May be fixed by #69

Comments

@ZaidMaslouhi
Copy link

Description

When using a join condition that includes an array-like value (such as a date range) in the on clause, the current parsing mechanism fails to correctly convert the query string to a plain object.

Specific Example

The following query string causes issues:
join[]=events||id,name||on[0]=event.date||$between||16-12-2023,23-12-2023

Current Behavior

  • The parsing logic breaks when encountering comma-separated values within the on clause
  • This prevents the correct transformation of the query string to a usable object for filtering

Expected Behavior

The join condition should successfully parse the query string, correctly handling array-like values such as date ranges.

Potential Impact

  • Prevents users from using complex join conditions with range-based filters
  • Limits the flexibility of querying across related entities with multiple condition types

Reproduction Steps

  1. Construct a query string with a join condition containing a comma-separated value
  2. Attempt to parse the query string
  3. Observe the parsing failure

Additional Context

This issue is particularly problematic for date range queries and similar scenarios requiring multiple values in a single condition.

Possible Solutions

  • Enhance the parsing logic to correctly handle comma-separated values
  • Implement a more flexible parsing mechanism for complex join conditions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant