Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the Class-DBI CPAN distribution.

Report information
The Basics
Id: 13303
Status: new
Priority: 0/
Queue: Class-DBI

Owner: Nobody in particular
Requestors: azb987654321 [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

To: cdbi-talk [...]
From: azb987654321 [...]
Subject: Bug.
Date: Wed, 3 Sep 2003 15:31:59 +0100 (BST)
Download (untitled) / with headers
text/plain 895b
There appears to be a bug in the handling of triggers: Create a Class::DBI object containing a field 'foo' with a 'before_set' trigger which disallows null values, and a field 'bar' without any triggers. create() the object, setting both fields to valid values. update() and dbi_commit(). Now, retrieve() the object, and set() only the field without a trigger ('bar'). The before_set_foo trigger gets called during the set() call, and fails becuase the value of 'foo' passed to the trigger is null - i.e. the $self->validate_column_values() call in set() does not take into account the current values that were retrieved from the database, only the values which were passed to the set call. DWIM would suggest the ability to do: my $o = O->retrieve($id); $o->set(bar => 'new value'); to change only the value of bar (not foo). But this doesn't appear to be allowed by the current code.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to