[rules-users] "distinct" operator in a query

Wolfgang Laun wolfgang.laun at gmail.com
Wed Nov 13 07:17:29 EST 2013


What about exists?

On 13/11/2013, braveheart85 <andrea.pacifico.85 at gmail.com> wrote:
> Hello guys,
>
> I make a very simple question, especially for a curiosity.
> I have this query:
>
> query "QuerySelected"
> 	$result: Person( identifierCode == "ABCDEF12H45S100A" )
> 	$y: YearData( id ==  $result.identifierCode )
> 	exists Vehicle( ) from $y.vehicles
> end
>
> With this query i get two equal person results because there are two annual
> that matches with condition.
> There is a simple way in drools to apply "distinct" operator or avoid this
> behaviour.
>
> Best regards
>
> Andrea
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/distinct-operator-in-a-query-tp4026762.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list