Hi!

We updated Opsview to the latest DBIx::Class 0.08124 and got loads of unexpected errors.

In one script, we set $SIG{__DIE__} to catch any unexpected conditions and store those. With the update, we were getting lots of errors with:

DBIx::Class::InflateColumn::get_inflated_column(): Unable to satisfy requested constraint 'name', no values for column(s): 'name' at (eval 1396) line 2

This is due to _build_unique_cond issuing a throw_exception when conditions are passed in that do not match with the unique_conditions it expects. However, a call like $rs->find(1) will try all the different unique constraints to see if it can find something, thus causing the above message to get thrown in non-exceptional circumstances.

I've made a patch below which tells _build_unique_cond to avoid throwing this error if a flag is set. There is also an update to t/ 60core.t to catch this situation.

Can this go in a future DBIx-Class release? If so, can this be credited to "Ton Voon, Opsera Limited".

Ton

Attachment: dbix_class_with_less_dies.patch
Description: Binary data

_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]

Reply via email to