Skip to content

Foreign Key annotation syntax #8

@Trellian

Description

@Trellian

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions