My own version of ActiveRecord