Quoting John Siracusa <[EMAIL PROTECTED]>:
> Did you use the Loader to make these classes?  MySQL tends to offer up
> empty string default values for non-null character columns, and the
> Loader dutifully reflects that, having no way to distinguish between
> "legitimate" empty string default values that you put explicitly in
> the table definition, or the "bogus" ones that MySQL auto-creates.

Yep, generated from Loader. They are not-null columns, so mysql
apparently gives them a default of '' (otherwise it'd be default null,
which wouldn't cause the same problem)

> To avoid this problem, either eliminate the empty string default
> values manually or automatically (by using the Loader's pre_init_hook
> to walk the column list and remove empty string defaults) or else pass
> the "use_key" parameter to load() and specify your key explicitly.

Will do.  It might be worth noting in the loader documentation that
mysql does this, and how it affects loader, if it isn't already there
(it's entirely possible i missed it).

Adam



-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to