Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception thrown when undefined property is checked for uniqueness #27

Open
philippsimon opened this issue Apr 21, 2013 · 1 comment
Open

Comments

@philippsimon
Copy link

TypeError: Cannot read property 'constructor' of undefined
    at MySQL.all.order ([...]/node_modules/jugglingdb-mysql/lib/mysql.js:270:34)
    at Array.forEach (native)
    at buildWhere ([...]/node_modules/jugglingdb-mysql/lib/mysql.js:265:28)
    at MySQL.all ([...]/node_modules/jugglingdb-mysql/lib/mysql.js:233:26)
    at Function.all ([...]/node_modules/jugglingdb/lib/model.js:396:25)
    at ModelConstructor.validateUniqueness ([...]/node_modules/jugglingdb/lib/validations.js:289:22)
    at validationFailed ([...]/node_modules/jugglingdb/lib/validations.js:465:15)
    at Validatable.isValid.trigger.constructor._validations.forEach.valid ([...]/node_modules/jugglingdb/lib/validations.js:367:21)
@dgsan
Copy link
Contributor

dgsan commented Jun 12, 2013

Setting aside the uniqueness constraint:

What do you even expect to have happen when you try to store undefined in MySQL? It seems kind of like undefined behavior in C. I agree ending up with an exception isn't the greatest thing, but what should it do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants