[Dbix-class] Unrequested insertion
Matt S Trout
dbix-class at trout.me.uk
Thu Jan 25 10:50:30 GMT 2007
On 24 Jan 2007, at 13:35, Xavier Robin wrote:
> Hello,
>
> I'm facing a weird problem with DBIx::Class (used through Catalyst).
>
>> Caught exception in
>> MIAPE::Controller::Experiment::Gel::Detection->make_detection_widget
>> "DBIx::Class::AccessorGroup::__ANON__(): Error executing 'INSERT INTO
>> gel.detection_reagents_buffers (detection_reagents_buffers_id)
>> VALUES (?)':
>> ERROR: null value in column "reagents_buffers" violates not-null
>> constraint"
>
> Well, this constraint exists, but the fact is I wasn't trying to
> insert
> anything into the database.
You tried to follow a belongs_to rel. Since that's expected to always
be there, DBIC tried to create it for you when it didn't find it.
Either your schema is broken, your foreign key constraints are
broken, or your code is broken.
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for
details.
+ Help us build a better perl ORM: http://dbix-
class.shadowcatsystems.co.uk/ +
More information about the Dbix-class
mailing list