Basic structure for quering one or many objects