You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get the latest git version and try this (adjust to your code):
orm.settings.set("properties.not_null",true);// changes default to NOT NULLorm.connect("mysql://....",function(err,db){varPerson=db.define('person',{name : String});Person.sync();// ...});
ok your very fast. Thanks for all your help.... The next problem is existing tables... how to add null? And what about validation... it would be great if this was also default handled (you cant create an item anyway...)
Existing tables are more hard to handle but it's in the plans (#103). For validations look at the first example in the Readme. I know the documentation is scarse but I tend to code more and document less.
Probably just nitpicking, but could we call this setting 'required' just like we have on has one associations? It does the same thing. I'm also thinking that 'notnull' may not make sense for non-sql datastores. 'required' is more general.
Activity
dresende commentedon Apr 10, 2013
There isn't yet, I'll work on it.
Adds default settings properties.not_null = false (#110)
dresende commentedon Apr 10, 2013
Get the latest git version and try this (adjust to your code):
GoNode5 commentedon Apr 10, 2013
ok your very fast. Thanks for all your help.... The next problem is existing tables... how to add null? And what about validation... it would be great if this was also default handled (you cant create an item anyway...)
dresende commentedon Apr 10, 2013
Existing tables are more hard to handle but it's in the plans (#103). For validations look at the first example in the Readme. I know the documentation is scarse but I tend to code more and document less.
dxg commentedon Apr 10, 2013
Probably just nitpicking, but could we call this setting 'required' just like we have on has one associations? It does the same thing. I'm also thinking that 'notnull' may not make sense for non-sql datastores. 'required' is more general.
dresende commentedon Apr 11, 2013
Agree