You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$value will have a body entry, not a body_id entry, from the submitted form. So it always falls back to the item lookup, so on creation that's nothing and on editing the body is the original body not the new one. In both those cases it therefore doesn't find the $value->{body} entry and incorrectly passes validation.
It needs to know how to turn either body_id into body or vice-versa, at the accessor for those columns, not the actual column names, but I'm not sure how best to do that.
The text was updated successfully, but these errors were encountered:
If you have a DB model, something like:
And a matching form (which needs
body
to work,body_id
does not):And your database has three rows:
Then the following happens:
This is because the form column is
body
but the database field isbody_id
. Here is the bit of code responsible:html-formhandler-model-dbic/lib/HTML/FormHandler/TraitFor/Model/DBIC.pm
Lines 492 to 495 in e580d8a
$value
will have abody
entry, not abody_id
entry, from the submitted form. So it always falls back to the item lookup, so on creation that's nothing and on editing the body is the original body not the new one. In both those cases it therefore doesn't find the$value->{body}
entry and incorrectly passes validation.It needs to know how to turn either body_id into body or vice-versa, at the accessor for those columns, not the actual column names, but I'm not sure how best to do that.
The text was updated successfully, but these errors were encountered: