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
Sequelize.BOOLEAN currently forces user to have to input a value on insert/update #16
Comments
Yep you are right. I've chosen NOT NULL because it doesn't make any sense to have a boolean value with 3 states ^_^ The problem is, that you currently can't set default values. But I really have to implement that. If done, you will be able to just set the default for the boolean values. For now I would recommend to not allow NULL but to set a default :) |
I tried NULL with a default but couldn't get it to work. It created the table with the correct defaults but tried to set the booleans to NULL on insert/update... :/ |
hey I just implemented default values and the possibility declare a field as non-null/null field. please let me know if this works nicely :) I will change the documentation soon, but for now: s.define("foobar", { this will define the field aBoolean with the default of false and which is not allowed to save a null value furthermore you will get a field aString which is just the normal varchar string :) |
if that works nicely i will push a new version 0.4 to github/npm |
and the documentation: http://sequelizejs.com/#basicMapping |
Very nice! Will try it out today. |
this seems to work :) |
* feat(oracle): add oracle dialect support (#1) * feat(oracle): add oracle dialect support * fix: addressing review comments (#7) * fix: addressing review comments * fix: minor fixes done (#9) * fix: minor fixes to the review comments * fix: merge from sequelize-v6 * fix: enable newly added unit tests for Oracle dialect * fix: remove dangling comma (#13) * fix: doc gen is fixed * fix: autogenerate the primary constraint name (#14) * fix: autogenerate the primary constraint name * fix: remove trailing comma * fix: make changes to ORADERBY as per v6 sync * fix: move test-unit-oracle above test-unit-all * fix: rename getInsertQueryReturnIntoBinds to populateInsertQueryReturnIntoBinds * fix: reorder parameters for function populateInsertQueryReturnIntoBinds * fix: incorporated review comments (#16) * fix: incorporated review comments * fix: modify string empty check with !
* feat(oracle): add oracle dialect support (#1) * feat(oracle): add oracle dialect support * fix: addressing review comments (#7) * fix: addressing review comments * fix: minor fixes done (#9) * fix: minor fixes to the review comments * fix: merge from sequelize-v6 * fix: enable newly added unit tests for Oracle dialect * fix: remove dangling comma (#13) * fix: doc gen is fixed * fix: autogenerate the primary constraint name (#14) * fix: autogenerate the primary constraint name * fix: remove trailing comma * fix: make changes to ORADERBY as per v6 sync * fix: move test-unit-oracle above test-unit-all * fix: rename getInsertQueryReturnIntoBinds to populateInsertQueryReturnIntoBinds * fix: reorder parameters for function populateInsertQueryReturnIntoBinds * fix: incorporated review comments (#16) * fix: incorporated review comments * fix: modify string empty check with ! * feat: support for Oracle DB 18c * Oracle DB version change * added stop-oracle for 18 * fix: changes to DB version query * fix: cleanup * fix: describetable query fix * fix: dbVersion to remove round trip and 18.4 json test fix * fix: removed dbversion * fix: removed comment * fix: testing a feature * fix: testing a feature * fix: testing a feature * fix: testing a feature * fix: testing a feature * fix: testing a feature * fix: test * fix: test * fix: test * fix: test * fix: using semver to coerce version sring * fix: update to instant client latest version for oracle db 21c * fix: update to oracledb version in package.json * fix: update lockfile * fix: remove duplicate privileges.sql and wait-until-healthy.sh * fix: changes to start-oracle alias * fix: changes to start-oracle alias * fix: changes to start-oracle alias Co-authored-by: Sudarshan Soma <48428602+sudarshan12s@users.noreply.github.com>
After requiring I simply have to add...
...or I will get an error if I leave out any boolean field values on insert/update (save).
The text was updated successfully, but these errors were encountered: