first of all great project, will save so much time. But i've got two major problems with it.
1) for mysql tinyint(1) fields should be considered as boolean (thats what mysql uses as boolean type)
2) if i use a default value for my primary keys like "(uuid())" which tells mysql to autogenerate the uuid for me (mysql >= 8) then the generator does not add any default value and therefore makes the field required in attributes. How are you supposed to handle this?
The library does not make assumptions about what type a column should be mapped to, it uses the type mapped by the node.js driver for that specific database. In this case mysql driver maps MySQL tinyint to a number in javascript. If you want to cast it to a boolean is very simple in javascript, just use !!your_column.
Could you try the latest version? I've added specific default mappings in MySQL for uuid() and now() functions.
Hi there,
first of all great project, will save so much time. But i've got two major problems with it.
1) for mysql tinyint(1) fields should be considered as boolean (thats what mysql uses as boolean type) 2) if i use a default value for my primary keys like "(uuid())" which tells mysql to autogenerate the uuid for me (mysql >= 8) then the generator does not add any default value and therefore makes the field required in attributes. How are you supposed to handle this?
Regards Alex