how to associate an array of variables with a filter

I need to create some filters which from a list of a table select the variables that I am going to group in the filter, then I must select the variable or the list of variables that are grouped and create a filter with the name and associated variables in the filter. I have achieved select the variables and store them but I don't know how to group variables when it is not a single variable but more than one without creating another filter object. Could you give me some suggestions to address this requirement? This is the domain model I have   The second image shows the possible sequence where I select the avrible one and the example of the first filter is the one that I have not been able to solve in which the variables of that array are grouped in a single filter
1 answers

Hi Carlos,

I am not exactly sure what you are trying to achieve, but i think the first step is to create a one-to-many association between Filters and VariableSelect. In that way you can associate a filter to a selection of VariableSelect objects.