[Dbix-class] Bug with relationships on new objects.
Matt S Trout
dbix-class at trout.me.uk
Wed Jan 23 06:01:37 GMT 2008
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().
> Looking at the test cases accompanying the commit that introduced this
> behaviour, it would seem that the author (CaptainL) thinks that
> calling a relationship on an unset FK should return all rows, this
> doesn't seem right to me - but if that's correct then the same object
> when inflated should do the same.
Returning all rows is silly.
And anyway, Luke's in hospital with appendicitis at the moment so he can't
contradict me :D
--
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/
More information about the DBIx-Class
mailing list