silverstripe/silverstripe-framework — pull request #2616 by Zauberfisch (2013-10-28 01:20:28+00:00)
Title: Check if remote class exists in DataObject->getRemoteJoinField()

(also fixed comment mistake)

this will improve developer experience due to an error message that makes sense (previously the error message if the class is not found was `No has_one found on class '$remoteClass', the has_many relation from '$this->class' to '$remoteClass' requires a has_one on '$remoteClass'` since the field was not found, but this can be misleading if you have a typo in your relation or your class name.

but I can't speak to performance, I can imagine that this brings a slight performance penalty since every has_one or has_many relation will do a class exists check.
Maybe we should do this sort of check in `/dev/build` instead?