model template updated for relation
complex plugins