[Catalyst] CDBI issue?

Alan Humphrey alan.humphrey at comcast.net
Wed May 11 19:43:03 CEST 2005

This is probably not directly a Catalyst issue, but perhaps someone on
this list can help.

I have an 'update' method in my controller that saves off the changes to
a record.  Pertinent code is:

	   $site =
	   eval {
		 $site->update_from_form( $checked );

The changes are being written to the database.

At the end of "update" I forward control to the "list" method.  This
method runs a query against the database and returns results.  It works
fine if called directly.

However, if the call comes from the update then the record that was
written to the database comes back incorrectly.  A data dump shows the

							bless( {
                                                   'id' => '8',
                                                   'site_name' => 'Brand
new site 1',
                                                   'ecoregion_name' =>
'region 1'
'BirdWeb::Admin::M::BirdWebDB::BirdingSites' ),
                                          bless( {
                                                   '__Changed' => {},
                                                   'id' => '9'
'BirdWeb::Admin::M::BirdWebDB::BirdingSites' ),


Why is id 9 not the same as the id 8?  It was the record most recently
changed, but the changes were saved.  Is there something I need to do to
clear the object from memory?


- Alan

More information about the Catalyst mailing list