Let's assume I have the following entity...
entity MyEntity : cuid {
userId : String;
active : Boolean;
field1 : String;
field2 : String;
}
I want to add a unique constraint annotation for userId and active === true.
So I can have any number of entries with the same userId and active === false. But only one active userId.
Is it possible to do so ??