Group ManytoMany Data on one key and show count
Group ManytoMany Data on one key and show count
I have a Many to Many resolution table between two entities in my Database. I want to send the data of the join table to the DataTables plugin where it will initially show a list of all of Table A's entries, and when you click on it it will expand and show the related Table B entries.
My issue is that Each item of Table B will show up many times obviously, I want to tell the DataTables plugin to only show one occurrence of Table B while keeping the count to show in another column as that is the number of Table B entries that have a relationship with that Table A entry.
Essentially I want to show a many to many relationship, in a one to many way.
Is there a way to do this in Data tables?
My issue is that Each item of Table B will show up many times obviously, I want to tell the DataTables plugin to only show one occurrence of Table B while keeping the count to show in another column as that is the number of Table B entries that have a relationship with that Table A entry.
Essentially I want to show a many to many relationship, in a one to many way.
Is there a way to do this in Data tables?
This discussion has been closed.