On Feb 3, 2008 3:59 PM, Grzegorz Nosek <[EMAIL PROTECTED]> wrote: > However, the problem arises after calling: > > my ($a_foo) = @{ Foo::Manager->get_objects( query => [ id => 5, is_even => 0 > ] ) }; > $a_foo->v2( 5 ); > $a_foo->save( changes_only => 1 ); > > The is_even condition is a result of my condition builder (e.g. a user > may access any foo as long as its value is even). The rather weird call > to a manager method to get one item is its artefact too. > > After executing the above snippet, RDBO wants to update the is_even > column and gets barfed at by PostgreSQL (there's no is_even column).
One quick fix might be to convince RDBO that the column is not modified, perhaps by adding an on_set trigger to that "fake" is_even column that uses the unset_column_value_modified() utility function: http://search.cpan.org/dist/Rose-DB-Object/lib/Rose/DB/Object/Util.pm#unset_column_value_modified > Apparently the setter for the is_even column is called within the > get_objects function, but AIUI, this shouldn't result in marking the > column modified. That may be a bug, but... > I'm using RDBO v.0.763. ...I suggest getting the latest RDBO and then report back if the Manager call still results in an object whose is_even column is marked as modified. (And even if it's still a problem, you should consider upgrading anyway. Many important bugs have been fixed between 0.763 and now :) -John ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object