I have a xml-column in a table that I inflate and deflate to an object like this:
This works and I can do the following:__PACKAGE__->inflate_column('xml', { inflate => sub { MyObject->new( xml + => $_[0] ) }, deflate => sub { $_[0]->asXML }, } );
Now assume the MyObject-class has a method "bubba" that changes it's state. Then this does not work:$row->xml(MyObject->new( xml => "<hubba/>" ); # row is now dirty $row->update; # goes to the database
So the problem is that calling methods on the inflated object does not make the column "dirty" for DBIx::Class.$row->xml->bubba("whatever"); #works in memory but column is not co +nsidered dirty $row->update; # does nothing
So my question is how can I (or better the inflated object) tell DBIx::Class that the column is now dirty and should be written back to the database?
Many thanks!
In reply to inflated columns in DBIx::Class by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |