[Dbix-class] Result column accessors not called with update method?

Adam Witney awitney at sgul.ac.uk
Mon Jun 16 11:11:35 GMT 2014


I wrote an accessor on a date column within my Result class, to check if 
the date supplied is not in the future.

This works fine if I use it like so:


however this doesn't work if I update like so:

$result->update({ collection_date => '1/1/2014' });

This appears to be as documented:


But I wondered, is there a way round this or if not, where is the best 
place to put this kind of validation that will work no matter which 
update approach I take?

Thanks for any help


More information about the DBIx-Class mailing list