[CDBI] Difference between add_constraint during INSERT and UPDATE?
jmorano at moretrix.com
Mon Dec 19 16:01:39 GMT 2005
I've just discovered that when I submit a form, which is going to insert
data into the database, and when I have created constraints in CDBI with
the method 'add_constraint', that the constraint is not executed on the
columns that have an empty value.
When I try to update that row in my same webapp, in a update window/mode
thing, columns with empty values are being send through the constraint.
Is this a normal operation?
I retrieve my params with Apache::Request->parms (so it's an Apache::Table
object). And in both screen (insert and update), the empty columns look
column_name => ''
I thought that the constraints were always called, that's why I had
created some constraints to check if the user really entered something in
the input field, because otherwise the database would send error
Anybody any ideas?
More information about the ClassDBI