Clone of selected features of ActiveRecord