I think your goal in this question is clustering nodes and getting each cluster from node object. also each cluster has multi nodes but every node has just one cluster. but the the aggregating is not for this application. it is for "has one" relationship. For doing this you can define a singleton class and save every cluster in it. next you need to add a function to get each cluster by it's id. also you must save cluster id in each node too. I hope this works for you.