You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I just upgraded from an older version to v4.2.3 and have an issue with the code generation. I could reproduce it in a sample project as well.
Here are some classes which are referenced by a ForeignKey (which is also a PrimaryKey) and the column is renamed in ForeigKeyReference
@Table(database = AppDatabase.class)
public class AntHill extends BaseModel {
@PrimaryKey
public String hillId;
}
@Table(database = AppDatabase.class)
public class Ants extends BaseModel {
@PrimaryKey
public String antId;
@PrimaryKey
@ForeignKey(tableClass = AntHill.class, references = {
@ForeignKeyReference(columnName = "hillIdRef", foreignKeyColumnName = "hillId")
})
public String hillId;
}
The Project won't compile as it is because there is an error in the Ants_Table.java. error: cannot find symbol variable hillId
Caused by that generated method in the Ants_Table.java:
@Override
public final OperatorGroup getPrimaryConditionClause(Ants model) {
OperatorGroup clause = OperatorGroup.clause();
clause.and(antId.eq(model.antId));
clause.and(hillId.eq(model.hillId));
return clause;
}
It should be clause.and(hillIdRef.eq(model.hillId)); if I'm not wrong.
The text was updated successfully, but these errors were encountered:
DBFlow Version: 4.2.3
Hi, I just upgraded from an older version to v4.2.3 and have an issue with the code generation. I could reproduce it in a sample project as well.
Here are some classes which are referenced by a
ForeignKey
(which is also aPrimaryKey
) and the column is renamed inForeigKeyReference
The Project won't compile as it is because there is an error in the
Ants_Table.java
.error: cannot find symbol variable hillId
Caused by that generated method in the
Ants_Table.java
:It should be
clause.and(hillIdRef.eq(model.hillId));
if I'm not wrong.The text was updated successfully, but these errors were encountered: