Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Model inheritance #332

stijnbe opened this Issue · 1 comment

3 participants


How would you implement model inheritance using Geddy? Let's say you wan't a model for animal, dog and cat. Where dog and cat inherit from animal.


ActiveRecord supports single-table inheritance, like this:

Our Model layer doesn't support this yet. The best way to work around this at present is to use composition instead. .So, for example, instead of having an Admin type that descends from User, you'd add an associated AdminRole to the User, that adds the administrative capabilities.

I've added a ticket for Model for this: geddy/model#37

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.