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

Support filtering nested associated models #690

Open
hudson-newey opened this issue Oct 29, 2024 · 0 comments
Open

Support filtering nested associated models #690

hudson-newey opened this issue Oct 29, 2024 · 0 comments

Comments

@hudson-newey
Copy link
Member

hudson-newey commented Oct 29, 2024

A really amazing feature of the API is that we can filter by properties on associated models

// POST /audio_events/filter
{
	"filters": {
		"audio_recordings.id": {
			"in": [1, 2, 3, 4]
		}
	}
}

However, nesting these associations does not work

e.g.

// POST /audio_events/filter
{
	"filters": {
		"audio_recordings.projects.id": {
			"in": [1, 2, 3, 4]
		}
	}
}

We should add support for nested associations in filter conditions like the example above so that filter conditions can support more complex queries such as filtering by project id on an audio event (through the associated audio event model).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant