Bug #11056

findOneBy*() methods should return NULL if no item was found

Added by Bastian Waidelich over 4 years ago. Updated over 4 years ago.

Status:Resolved Start date:2010-11-24
Priority:Should have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 14
PHP Version: Complexity:
Has patch: Affected Flow version:

Description

Currently all findOneBy*() methods of repositories return FALSE, if no records where found. As discussed this should be changed to NULL as done in Extbase (see #10958).

Associated revisions

Revision 86305942
Added by Robert Lemke over 4 years ago

[!!!][~TASK] FLOW3 (Persistence): Make getFirst() return NULL on empty result

The QueryResult::getFirst() method – and consequently also the repository's
findOneBy*() method – returned FALSE if the result set was empty. Because
this is contrary to the conventions elsewhere in FLOW3, this changes the
behavior of getFirst() to return NULL instead.

Change-Id: Icee8712ee9d610f629b7703212dbd3920fa44c1d
Resolves: #11056

History

#1 Updated by Robert Lemke over 4 years ago

  • Assigned To changed from Bastian Waidelich to Robert Lemke
  • Target version set to 1.0 alpha 14

#2 Updated by Robert Lemke over 4 years ago

  • Status changed from Accepted to Under Review
  • % Done changed from 0 to 100

#3 Updated by Robert Lemke over 4 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF