Closed yshrsmz closed 7 years ago
@yshrsmz The code generated by this library will be compiled in as part of that module. So I would be a bit surprised if it doesn't work already? It does depend on the common module being compiled successfully first though.
fmm. Okay, let me check once more
It seems like working for standard RealmObject from another module and I can access generated XxxFilelds classes
But when I have following RealmObjects, I found that generated ParentFields
only has name
field.
// Child is from common module
@RealmClass
class Child implements RealmModel {
// some field and getter
}
// Parent is in app module
@RealmClass
class Parent implements RealmModel {
String name;
Child child;
}
Ok. That might be a bug. I'll look into it. Thanks
Realm version: 2.2.2 RealmFieldNamesHelper version: 1.1.0
Say my app is consist of 3 modules. An application module, tv module and common module. the application module is for mobile app, the tv module is for Android TV, and common module has some common classes which are used by both app and tv module. Every module has RealmObjects.
So the problem is, XxxFields classes for RealmObjects from different module(common module) are generated in its module's build directory, but cannot be accessed from other modules.
I know it's not specific to this library, but Realm has support for multi module project, so it would be great if RealmFiledsNameHelper also support multi module project. https://realm.io/docs/java/latest/#sharing-schemas