From: Daniel Westermann-Clark Date: Mon, 5 May 2008 22:21:36 +0000 (+0000) Subject: Note that single expects a single row in the ResultSet docs X-Git-Tag: v0.08240~464 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=effaacdd097c336cd3eec6d4e095089350a2e106;p=dbsrgits%2FDBIx-Class.git Note that single expects a single row in the ResultSet docs --- diff --git a/lib/DBIx/Class/ResultSet.pm b/lib/DBIx/Class/ResultSet.pm index 8adff20..f56254e 100644 --- a/lib/DBIx/Class/ResultSet.pm +++ b/lib/DBIx/Class/ResultSet.pm @@ -571,9 +571,17 @@ sub cursor { Inflates the first result without creating a cursor if the resultset has any records in it; if not returns nothing. Used by L as an optimisation. -Can optionally take an additional condition *only* - this is a fast-code-path -method; if you need to add extra joins or similar call ->search and then -->single without a condition on the $rs returned from that. +Can optionally take an additional condition B - this is a fast-code-path +method; if you need to add extra joins or similar call L and then +L without a condition on the L returned from +that. + +B: As of 0.08100, this method assumes that the query returns only one +row. If more than one row is returned, you will receive a warning: + + Query returned more than one row + +In this case, you should be using L or L instead. =cut