Adam Sjøgren wrote:
> On Sat, 12 Dec 2009 11:27:37 +0100, Peter wrote:
> 
> [...]
>> might_have and has_many produce identical SQL. The difference is how
>> the result is interpreted. has_many is a multi-type accessor, so when
>> you call ->doodads you get a resultset object from which 0 or more
>> objects can be retrieved. If instead you use might_have, calling the
>> accessor (which you'll probably call->doodad, instead of doodads) will
>> either return a *row* object, or undef. If the sql contains more than
>> 1 result, the first one is turned into an object, and the rest of the
>> results is discarded with a loud warning.
> 
> Thanks for this very clear explanation. It should be shoveled into the
> documentation right away!
> 

Implementors usually suck at writing wholesome documentation. Could you
be so kind to submit a patch against [1]. You will have both a better
idea where to put the text so a user will find it, and also how to word
such text so it makes sense to a novice.

Thanks!

[1] http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk/

_______________________________________________
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