[Dbix-class] PF::Auto: empty string vs undef

Jim Spath jspath at pangeamedia.com
Tue May 22 21:12:56 GMT 2007


You'd be right... MySQL 5.0.22, and I believe strict mode is off.

I've already made the necessary changes to pass undef, but it's nice to 
know there is a good reason behind the current functionality. ;)

Thanks!

Matt S Trout wrote:
> On Tue, May 22, 2007 at 03:38:00PM -0400, Jim Spath wrote:
>> I just ran into an issue that another user posted to the list in October:
>>
>> http://www.mail-archive.com/dbix-class@lists.rawmode.org/msg01949.html
>>
>> I was wondering if there were any updates to this particular issue?
>>
>> It appears that my only choice is to pass undef instead of empty string 
>> for the primary key column, but I guess I'm just curious if this is 
>> going to be addressed or not :)
> 
> Let me guess, MySQL <5 or MySQL 5 without strict mode on? (or SQLite?)
> 
> Most databases would throw a type mismatch error; eventually it would be nice
> is DBIC did that too for consistency on broken/substandard DBs.

-- 
Jim Spath
Lead Developer
Pangea Media
Em: jspath at pangeamedia.com
Ph: 617.923.0000 x113
Fx: 617.923.0101
IM: panJimS (AIM)



More information about the Dbix-class mailing list