On Wed, Apr 22, 2009 at 10:02:34AM -0700, David Ihnen wrote: > Matt S Trout wrote: > >On Tue, Apr 21, 2009 at 10:59:48AM -0700, David Ihnen wrote: > > > >> > >Which is why: > > > > > >>->create_related('ivr_holiday', { holiday => date, description => > >>$description }); > >> > >>is called. but does not create an error on groups when > >> > >>->create_related('ivr_holiday', { holiday => date, description => > >>$description, donor => undef }); > >> > > > >That change is correct - as I say, DBIC can't tell what's going to be in > >the database so it errs on the side of paranoia. > > > >Better to die() than to silently return the wrong thing. > > > > > Yes, but it does not explain why the groups relationship doesn't throw > the same error that the donor relationship did throw, when it is > configured identically with the same sort of relationships.
The error occurs when you call ->donor. I don't see any code calling ->groups. And anyway, isn't groups a has_many where it's your PK that's used (which will be present) ... -- Matt S Trout Need help with your Catalyst or DBIx::Class project? Technical Director http://www.shadowcat.co.uk/catalyst/ Shadowcat Systems Ltd. Want a managed development or deployment platform? http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/ _______________________________________________ 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/dbix-class@lists.scsys.co.uk