Added ability to eagerly load referenced entities with subclasses

This is a rather ugly implementation. But maybe someone knows how to do it in a better way ;)