Question: I have a bookings collection where I store data like this: Now, I want to ensure that there can be only one booking for a fieldId at a given date that has status: valid. There can be more or ...

Question: I have a table with Id, AccountId, PeriodId, and Comment. I have a unique index for (AccountId, PeriodId). I want to create such a row which does not violate the unique index. AccountId and PeriodId cannot be null, they ...