SQLKing icon indicating copy to clipboard operation
SQLKing copied to clipboard

Foreign Key annotation syntax

Open Trellian opened this issue 9 years ago • 1 comments

Hi Sam, thanks a mill for the 1.0.6 release. I have a new problem now:

in one of my tables, I have the following:

`@Table public class TblMapVisitor2Entry extends ScanTableBase implements Parcelable {

@Column(index = true, foreign_key = "TblEntry")
private int     entry_fk;
@Column private int entry_reason;   // E_ENTRY_REASON

` and it generates the following error:

error: [A @Column with a foreign_key can only annotate a variable whose data type is annotated with @Table]

What is the correct way to do this? Please note, that all of my tables extend from ScanTableBase, which looks like this:

`@Table public class ScanTableBase { // Fields common to all tables @Column protected int id; @Column protected int synch_status;

@Column protected long        synch_date;       // Last good synch date
@Column protected boolean     deleted;
...
 }

` Perhaps this is rocking the boat a bit?

Thanks, Adrian

Trellian avatar Jun 08 '16 10:06 Trellian

Foreign keys are not supported at the moment, I am developing them as part of the next release

samkirton avatar Jun 08 '16 11:06 samkirton