Reputation: 3500
On compilation of greendao classes, I have an exception:
Exception in thread "main" java.lang.RuntimeException: Source properties do not match target properties
private static void addMainSchema(Schema schema) {
Entity user = schema.addEntity("User");
user.addIdProperty();
user.addStringProperty("userName").unique().primaryKey();
user.addStringProperty("firstname");
user.addStringProperty("lastname");
user.addStringProperty("phone");
user.addStringProperty("secretKey");
user.addStringProperty("wifiPassword");
user.addStringProperty("stepLength");
user.addStringProperty("password");
}
Upvotes: 0
Views: 305
Reputation: 3500
Case: It is appear when IdProperty has been set before primary key. Fix: removing IdProperty.
// user.addIdProperty();
user.addStringProperty("userName").unique().primaryKey();
Upvotes: 2