I'm trying to model a isA relationship with Aqueduct. It is a one-to-one relationship but I need to make the @Relate column the primary key, however I cannot set both a @Relate and @Column tag. What would be the way to do this ?
Let's say I have a "user" table and a "admin" table. An admin is a user with more fields, for example user has an id, email, username and password, and admin has a user_id, access_level, fullname. Fields that are not needed for a regular user.
The way I'm coding this is like this:
class _User
{
@primaryKey
int id;
String email;
String username;
String password;
Admin admin;
}
class _Admin
{
@Relate(#admin)
User user;
int access_level;
String fullname;
}
But the migration can't be generated because I didn't declare a primary key for admin, and if I try to add @primaryKey or @Column above User user, I get an error that I can't both set Column and Relate metadata.