On Jan 23, 2008 6:01 AM, Matt S Trout <[EMAIL PROTECTED]> wrote: > On Tue, Jan 22, 2008 at 12:29:50PM +0000, Scott Thomson wrote: > > I'm up for writing a test case, I've already got the beginnings of one > > against which I used to help me locate the cause of the problem. > > However, I'm not at all sure what is the correct behaviour to assert. > > > > I do think that a 'create'd object should have exactly the same > > external behaviour of an inflated object, which is currently not the > > case, as to what that behaviour should be I'm not so sure. > > How does it differ? > > So far as I can tell the question is as to whether the column is present > or not, which can be true or false whether the object was constructed > via new() or inflate_result().
Indeed, and this does cause differing external behaviour. Calling the rel accessor when the object has been created and hence the column is not set - returns all rows in the foreign table because no WHERE clause gets generated. Whereas if the same object is inflated - the column is set to 'undef', a where clause of fk = NULL is generated and no rows are returned. _______________________________________________ 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]
