Dynamoid icon indicating copy to clipboard operation
Dynamoid copied to clipboard

Single Table Inheritance .find and .all not working

Open luxx opened this issue 12 years ago • 0 comments

With these classes


# app/models/vehicle.rb
class Vehicle
  include Dynamoid::Document
  table key: :vehicle_id
  field :vehicle_id
  field :type
end

# app/models/car.rb
class Car < Vehicle
end

# app/models/boat.rb
class Boat < Vehicle
end

Car.all and Car.find(id) return the same thing Vehicle.all and Vehicle.find(id), which include Boat objects.

luxx avatar Jun 25 '13 21:06 luxx