How can I use Relate and unique using aqueduct ORM?
In my code I want that the userapp be unique?
If I try to put @Column(unique: true)
I receive a error like this:
*** Relationship 'userapp' on '_Professional' cannot both have 'Column' and 'Relate' metadata. To add flags for indexing or nullability to a relationship, see the constructor for 'Relate'.
My code below:
class Professional extends ManagedObject<_Professional> implements _Professional {}
class _Professional {
@primaryKey
int id;
@Relate(#professionals)
Userapp userapp;
@Column(defaultValue: 'true')
bool active;
ManagedSet<ProfessionalSpecialty> professionalSpecialties;
}