Closed TBoehm closed 8 years ago
I found the problem: If you do anything wrong while annotating a class (greenDAO 3), for example using a static String for setting a specific field name via @Property (btw. why is that wrong?! - what is the right way to do it?), the greendao plugin fails at generating the corresponding DAO which leads to the failure mentioned above.
You are right, looks like using a constant to define a custom column name is currently not supported. So you should do something like:
@Property(nameInDb = "SUPERMAN_COLUMN")
private String lastname;
-ut
Please check using version 3.1.1, which is currently on its way to Maven central. Let us know if it works for you.
Hey @greenrobot, thanks for looking at that feature/implementing it. However, atm I'm not using greendao in any project but I will try it out in the next one.
Still is not working for me on GreenDAO 3.2.2
As of today (version 3.2.2), it only works if constants are defined in the same file (class) as the Entity
If I try to execute the gradle plugin in my project
How do I fix that?
My gradle file looks like this: