[TYPO3-mvc] Extbase Query compare properties
Daan Wissing
d.wissing at spiritit.com
Thu Oct 24 14:59:53 CEST 2013
Hi all,
I am trying to use an Extbase Query to get a filtered list of objects, but I think that I have a problem. Apparently I cannot compare two properties of my object to eachother in one query. What I would like to do is to fetch all records of class Foo, where Foo.Bar is smaller than Foo.Baz. In SQL it would be:
SELECT *
FROM Foo
WHERE Foo.Bar < Foo.Baz
but the $query->lessThan($property, $operator) function only accepts either plain values or an Object as $operator.
I would rather avoid writing raw SQL statements, so if anybody knows a way to do this using Extbase Query, I would be very grateful :)
Regards, Daan
More information about the TYPO3-project-typo3v4mvc
mailing list