I'm having a problem where a Transfer object seems to cache when I'm
not intending it to. I have a Company object... that contains an
Address object (m2m). When a user attempts to update an existing
address with invalid data, the Address object is sent back to the form
page with an error struct on it. When the user corrects the invalid
data and submits, validation fails continuously until a reinit the
app.
Here is some pseudo-code of what takes place in each event...
http://dolearn.pastebin.com/mb913deb
As you can see in updateAddress(), I always pass the Address back to
the form event. However, the Address object should not exist when
updateAddress() is called. It seems that Address persists
indefinitely (until Transfer or CB decide to discard it). Again, this
manifests itself in the event where the Address fails validation.
After a user submits invalid data, the form notifies them. They
correct the problem. The next time the form is submitted, the Address
will set validation error regardless of the data provided in the form.
I see the same validation error (ie. "Invalid street
address.<br/>Invalid street address.<br/>Invalid street address.") on
each subsequent submit.
Do I have my head on straight? I'm happy to post this elsewhere if
this doesn't seem to be Coldbox-related. TIA.
--
Jason Durham