Update association to use 'get all' function rather than cycling through the database.

This is less reliant on the database since it asks the node how many groups it supports!