Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single Table Inheritance .find and .all not working #139

Open
luxx opened this issue Jun 25, 2013 · 0 comments
Open

Single Table Inheritance .find and .all not working #139

luxx opened this issue Jun 25, 2013 · 0 comments

Comments

@luxx
Copy link

luxx commented Jun 25, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant