Hello, I am trying to implement a very basic @SecondaryTable example but continually run into the same error. Here's the example:
@Entity
@SecondaryTable(name = "asset_ext", pkJoinColumns = @PrimaryKeyJoinColumn(name = "asset_id"))
public class Asset {
@Id
public int id;
public String name;
public Date dateSaved;
public byte[] file;
@Column(table="asset_ext")
public String extId;
public Asset(String name, byte[] file){
this.file = file;
this.dateSaved = new Date();
}
//getters and setters
}
And here's the error I keep getting:
Error with property Asset.extId. Could not find a Relationship to table asset_ext. Perhaps you could use a @JoinColumn instead.
The tables are well-defined with the proper primary/foreign key constraints (in a mysql db). I've tried mucking around in the source code but haven't figured it out yet. Does Ebean even support the @SecondaryTable annotation? Thanks.