Bring query logic to model data \array not being set