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

Wolfgang Laun wolfgang.laun at gmail.com
Wed Nov 13 11:04:10 EST 2013


Try an exists containing a pattern combination:

  exists ( $y: YearData( id ==  $result.identifierCode )
               and
               Vehicle( model == "foobar" ) from $y.vehicles )

-W

On 13/11/2013, braveheart85 <andrea.pacifico.85 at gmail.com> wrote:
> First thing I'm sorry for stealing your time.
> What you say is true in this case, but what about case which i would add a
> constraint to Vehicle:
>
> query "QuerySelected"
>         $result: Person( identifierCode == "ABCDEF12H45S100A" )
>         $y: YearData( id ==  $result.identifierCode )
>         exists Vehicle( model == "foobar" ) from $y.vehicles
> end
>
> Then again maybe my question is stupid.
>
> Andrea
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/distinct-operator-in-a-query-tp4026762p4026769.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