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

Realm model classes must either extend RealmObject or implement RealmModel to be considered a valid model class #2691

Closed
MarcinOrlowski opened this issue Apr 27, 2016 · 1 comment

Comments

@MarcinOrlowski
Copy link

MarcinOrlowski commented Apr 27, 2016

I got abstract class

abstract public class ModelBase implements ModelInterface { 
  ...
}

which is extended by my models. I now want some of them to be Realm powered:

@RealmClass
public class Something extends ModelBase implements RealmModel {
   ...
}

But this throws during compilation:

Error:(50, 8) error: Realm model classes must either extend RealmObject or implement RealmModel to be considered a valid model class

Is such model not supported or I am doing something obviously wrong here? Recent Realm version in use, so is Android Studio.

@cmelchior
Copy link
Contributor

Hi @MarcinOrlowski
We don't support extending other Realm classes just yet. It is being tracked here: #761, so i'll close this as an duplicate, but you can follow #761 instead.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants