On 13 Jun 2014, at 12:31, Peter Rabbitson rabbit+d...@rabbit.us wrote:
No you aren't. It is in fact a bug. Could you please write me a test that
shows the issue?
Yes I was! I pushed the undef into a wxPerl widget which, when retrieved,
returned ''. So when pushing into the DBIx::Class::Row
Hi,
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:
$result-collection_date('1/1/2014');
however this doesn't work if I update like so:
$result-update({ collection_date = '1/1/2014' });
Do it all in update()… Something like:
sub update {
my ($self, $columns) = @_;
$self-set_inflated_columns($columns) if ($columns);
if($self-collection_date $now) { … }
# Other logic, etc ….
return $self-next::method;
}
Henry
On Jun 16, 2014, at 7:11 AM, Adam Witney
And, yes, for the case of the ResultSet you have to handle it separately… to
force everything through the same machinery, in your resultset class you can
override ‘update’ to call ‘update_all':
sub update { (shift)-update_all(@_) }
Not that it is necessarily a good idea to do that… It will