Coder Social home page Coder Social logo

Comments (4)

PhilWaldmann avatar PhilWaldmann commented on June 6, 2024

I'm currently not at my machine, but please try validatesUniquenessOf('email', 'athlete_id') (without the array)

from openrecord.

PhilWaldmann avatar PhilWaldmann commented on June 6, 2024

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 c231894
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

from openrecord.

SampsonCrowley avatar SampsonCrowley commented on June 6, 2024

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!

from openrecord.

PhilWaldmann avatar PhilWaldmann commented on June 6, 2024

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

from openrecord.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.