Should just work for you out of the box. I suspect it looks like it's not firing because you're not asking for something from the EntityMappable
Try this:
EntityMap.includes(:entity_mappable).map(&:entity_mappable).map(&:class).map(&:name).uniq
I tried this with a couple of classes that use EntityMappable and the above gives this SQL output in rails console:
EntityMap Load (0.9ms) SELECT
entity_maps.* FROM
entity_mapsORDER BY
entity_maps.
positionASC
CameraShot Load (0.4ms) SELECT
vision_sources.* FROM
vision_sourcesWHERE
vision_sources.
typeIN ('CameraShot') AND
vision_sources.
idIN (89, 87, 88, 90, 85, 86) ORDER BY
vision_sources.
positionASC
Sound Load (0.3ms) SELECT
sounds.* FROM
soundsWHERE
sounds.
id` = 1
Note that the CameraShot model is a subclass of VisionSource which uses STI (and thus the type field to define itself), while the Sound model effectively looks like this:
class Sound
has_one :entity_map, as: :entity_mappable
end