[FLOW3-general] query constraint with check for Null
Manfred Rutschmann - VOLUMEN Werbe-/Internetagentur
rutschmann at agentur-volumen.de
Mon Feb 25 16:31:15 CET 2013
Hi,
untested:
$query->matching(
$query->logicalAnd(
$query->logicalAnd($constraints),
$query->logicalNot($query->equals('myProp', NULL))
)
);
The logicalNot IN a LogicalAnd with the other constraints.
Manfred
Am 25.02.2013 um 16:21 schrieb Thomas Mammitzsch <thomas at visualworx.de>:
> hi list,
>
> im trying to get objects, where a property is not Null.
>
> I tried:
>
> $query->matching(
> $query->logicalAnd($constraints),
> $query->logicalNot($query->isEmpty('myProp'))
> );
>
> $query->matching(
> $query->logicalAnd($constraints),
> $query->logicalNot($query->equals('myProp', NULL))
> );
>
> Both results contains objects where $myProp IS Null.
> I could not find an example for this kind of query.
> How can i achieve it?
>
> regards, Thomas
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
More information about the FLOW3-general
mailing list