TP wrote: > Hi, I have a model with a field called 'name' that is set to be non- > null. When I look at the actual table created in MySQL the field > really does say it cannot be null. However, when I try to set it to > None and commit() the changes, I get a warning printed > > /Users/tp/sw/python-extensions/lib/python2.5/site-packages/ > SQLAlchemy-0.4.5-py2.5.egg/sqlalchemy/databases/mysql.py:1488: > Warning: Column 'name' cannot be null > > > But the underlying database IS changed with the field being set to the > empty string ''. > > This seems wrong doesn't it? Am I doing something wrong? I'm using > SQLAlchemy 0.4.5 on Mac OS X with MySQL 5.1. > > Thanks for any help!
It's a server configuration issue- the server is using a legacy compatibility mode. Check the mysql docs for configuring sql mode to a modern, strict setting. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---