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

Support table-per-class inheritance for ActiveRecord models #5377

Closed
behrangsa opened this issue Mar 11, 2012 · 3 comments
Closed

Support table-per-class inheritance for ActiveRecord models #5377

behrangsa opened this issue Mar 11, 2012 · 3 comments

Comments

@behrangsa
Copy link

I had submitted this issue some time ago, but a douche nuzzle or something closed it before giving anybody a chance to view it.

Right now Rails only supports table-per-hierarchy inheritance strategy. Some ORM frameworks, such as Java Persistence API and Hibernate support other strategies as well, such as table-per-class. Some possible strategies are listed here for example.

Someone has implemented this using some hacks in ActiveRecord as well, details of which can be found here.

It would be nice if Rails had first-class support for table-per-class inheritance strategy.

@drogus
Copy link
Member

drogus commented Mar 14, 2012

From my point of view such feature should be maintained as a plugin, it looks like there is more than one way to do it and it will probably grow from the initial implementation presented in linked blog post.

@jeremyf
Copy link
Contributor

jeremyf commented May 7, 2012

@behrangsa I agree with @drogus that this should be a plugin. The AR hack is now a broken link, so I was looking at the other possible options. I'm also wondering if Ruby's Mixin architecture removes the necessity table-per-class strategy.

@drogus
Copy link
Member

drogus commented May 8, 2012

Closing this as there is no activity. If you still think that something like that should be in rails the easiest way is to implement it as a plugin and if the adoption is good there is a chance that it gets merged (and even if it's not, you can still use as a plugin).

@drogus drogus closed this as completed May 8, 2012
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

3 participants