Use model accessors instead of indexing attributes

This allows to specify virtual attributes, not directly corresponding to
any of the actual table columns of the data model.