Further extend the database service

It is now possible to add relationships to the model. Support is only for onetomany and manytoone.
The model class now implements ArrayAccess, for another way to get the values