fix device class getAll() function to retretive primary only entities
work on updateDevice API