Add object retrieval functionality to ActiveRecord