GithubHelp home page GithubHelp logo

auto-value-realm's People

Contributors

nbarraille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bebo isabella232

auto-value-realm's Issues

Realm is not creating table for the class

I wrote this class:

@AutoValue
public abstract class Invoice implements Parcelable, AvModel<$RealmInvoice> {

    @Nullable
    public abstract Integer something();

    @AutoValue.Builder
    abstract static public class Builder {
        public abstract Invoice build();
        public abstract Builder something(Integer something);
    }
}

I am trying to use it, but when I try to read/write from Realm, I get this exception:

io.realm.exceptions.RealmException: class com.my.package.model.$RealmInvoice is not part of the schema for this Realm.
                                                            at io.realm.internal.RealmProxyMediator.getMissingProxyClassException(RealmProxyMediator.java:241)
                                                            at io.realm.DefaultRealmModuleMediator.getTableName(DefaultRealmModuleMediator.java:228)
                                                            at io.realm.RealmSchema.getTable(RealmSchema.java:296)
                                                            at io.realm.RealmSchema.getSchemaForClass(RealmSchema.java:316)
                                                            at io.realm.RealmQuery.<init>(RealmQuery.java:138)
...

I noticed from the gradle output that Realm is processing other of my classes but none of those generated by this Autovalue extension:

19:11:52.610 [ERROR] [system.err] Note: Processing class OtherModel
19:11:52.612 [ERROR] [system.err] Note: Creating DefaultRealmModule

So, $RealmInvoice seem to be ignored by the Realm plugin.Therefore the DefaultRealmModuleMediator.java does not contain the class $RealmInvoice and that is why I am getting the exception.

Any ideas of what could be going on? Maybe when the Realm task is running before that class is generated? If so, any ideas of how to work around it?

Thanks!

README could use some details

Has no guidance currently around how this is supposed to be used, limitations, code snippets, maven coordinates, etc

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.