Dynamically adding joins based on relation?
I have this setup:
I can easily refer to columns within the
Can I also refer to relations to dynamically add a join?
E.g.:
and then based on user input I want to add some joins dynamically.
E.g. the user input could be sort on
As I have this in many places I would like to do something smart like:
based on such configs I wanted to apply the sort based on user input
Would something like that be possible?
I can easily refer to columns within the
circuit table like circuitTable.name or circuitTable.placeName.Can I also refer to relations to dynamically add a join?
E.g.:
and then based on user input I want to add some joins dynamically.
E.g. the user input could be sort on
placeName or country.name, and in the latter case I want to add the country join.As I have this in many places I would like to do something smart like:
based on such configs I wanted to apply the sort based on user input
sort field.Would something like that be possible?