[html-formfu] Deflation stopped working correctly after upgrade to HTML-FormFu-0.01005

Barry Hoggard bhoggard at gmail.com
Tue Oct 16 03:21:14 GMT 2007


Hello, all.  My application started throwing errors after I ugpraded
HTML-FormFu to 0.01005, and it seems to be due to objects being
stringified to HASH(xxx) rather than to their ID now.

Here is my setup for a relatively simple object

--
use base 'DBIx::Class';
__PACKAGE__->load_components(qw/ HTML::FormFu InflateColumn::DateTime
PK::Auto Core /);
__PACKAGE__->table("event");
__PACKAGE__->add_columns(qw/ event_id name description location url
recommended toppick image /);
__PACKAGE__->add_columns(
                         start_date    => { data_type => 'date' },
                         end_date      => { data_type => 'date' },
                         opening_start => { data_type => 'datetime' },
                         opening_end   => { data_type => 'datetime' },
                         last_modified => { data_type => 'timestamp' },
                        );
__PACKAGE__->might_have( image => 'Artcal3::DB::Image', {
'foreign.image_id' => 'self.image' });
__PACKAGE__->belongs_to( location => 'Artcal3::DB::Location' );
__PACKAGE__->set_primary_key("event_id");
__PACKAGE__->resultset_class('Artcal3::DB::Event::ResultSet');
--

The definition in YAML for the location field is

 - type: Hidden
   name: location

If I use fill_formfu_values() on that object now, the form value for
Location, which is a hidden field gets set to
AC3Admin::Model::Artcal3DB::Location=HASH(0x4080be0) instead of the
location's primary key.

Any thoughts on what to fix here?

-- 
Barry Hoggard



More information about the HTML-FormFu mailing list