Auto setter for relations with tests (thanks to Jan →).

Support for subclasses of the model specified.

null is also a valid value to be set for relations