Check config to set relations

this is better for ORM optimisation and avoid the "deleted author" error if authors are not enabled.