[TYPO3-mvc] Query greaterThanOrEqual / lessThanOrEqual not working

Alexander Dick typo3 at dick.at
Thu Feb 9 11:15:20 CET 2012

Hi everybody!

I have a listing of records, and on top of that I made 2 input fields to 
specify a date range.

For that I implemented a repository method findByDate():

  * @param integer $dateFrom Start date timestamp
  * @param integer $dateTo End date timestamp
public function findByDate($dateFrom, $dateTo) {
	$query = $this->createQuery();
				$query->equals('deleted', 0),
				$query->equals('is_complete', 1),	
$query->lessThanOrEqual('date', $dateTo)

the date field is of type integer and holds a timestamp.

The problem is that no results are returned as soon as I add 
greaterThanOrEqual or lessThanOrEqual.

I also debugged the query, and everything looks fine.
Even when I paste it into phpmyadmin the correct results are shown.

Any clues?


More information about the TYPO3-project-typo3v4mvc mailing list