Exception: MassiveRecord::ORM::IdentityMap::RecordIsSuperClassOfQueriedClass
- Inherits:
-
MassiveRecordError
- Object
- StandardError
- MassiveRecordError
- MassiveRecord::ORM::IdentityMap::RecordIsSuperClassOfQueriedClass
- Defined in:
- lib/massive_record/orm/identity_map.rb
Overview
Error is raised internally of the identity map to signal that you tried to get a record from a parent class, but you looked it up via it’s sub class. For instance A is a super class of B. IdentityMap.get(B, “id-belonging-to-an-A-class”) will raise the error.
This error will however not “leak” outside of the identity map’s code. It should be handled internally, and the goal for it is just not to hit the database more than we need to if we know that the database will return nil as well.