Initial progress on model query relations.
Add support for One-to-Many relation resolving.
Refactoring.
Prefix columns in model queries when needed.
Further refactoring.
Finishing touches.
Merge branch 'develop' into model-query-relations

* develop:
  Aggregate function fix.
  Model fields.
Couple more tweaks.
Merge pull request #1 from kasperisager/model-query-relations

Implement automatic model relation resolving.