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

Can't subclass a subclass of Granite::Base? #500

Open
Eldomir opened this issue Oct 30, 2023 · 1 comment
Open

Can't subclass a subclass of Granite::Base? #500

Eldomir opened this issue Oct 30, 2023 · 1 comment

Comments

@Eldomir
Copy link

Eldomir commented Oct 30, 2023

This might just be ignorance, but I didn't know where to ask exactly. I have a class "Entity" which is a subclass of Granite::Base, and when I try to subclass Entity into Item, I get the following error:

"Error: can't annotate @new_record in Item because it was first defined in Entity"

Does this mean I can't use inheritance for any of my classes that inherit from Granite::Base?

@hugopl
Copy link

hugopl commented Jan 12, 2024

I believe this very same issue also blocks the use of a rails-like pattern of having a ApplicationRecord class as base class for all models, I get the same error.

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

2 participants