Closed SampsonCrowley closed 7 years ago
I'm currently not at my machine, but please try validatesUniquenessOf('email', 'athlete_id')
(without the array)
Yep, that's a bug! Thanks for reporting.
I've just added a bunch of new tests to cover the use of e.g. .validatesUniquenessOf(['email', 'athlete_id'])
in c231894cd9ce63319bdee51a4f005a756ced4d87
Unfortunately there was a bug, so that OpenRecord tries to find a field with the name of ['email', 'athlete_id']
.
I've just published version 1.11.2
to fix this issue.
Thanks, Philipp
No problem. I'm still having connection issues, but that's becaus of the way knex works. Unfortunately that means I can't use your library until knex figures out how to check for disconnects from the database. My database is set to close idle connections after 2 minutes, which knex doesn't try to reconnect. But know you've inspired me in the custom ORM that I'm writing!
Good to know! What settings do you have set in your database (postgres right?)
Maybe we could find a solution for your problem and open a PR for knex
validatesUniquenessOf
never seems to run. I'm getting database level errors of unique index violations on an email column