[rules-users] question on syntax with FROM keyword
Mark Proctor
mproctor at codehaus.org
Fri Nov 2 13:19:21 EDT 2007
put brackets around the SomeObject and from statement
not ( SomeObject(val == "5") from dao.find(99) )
Eric Miles wrote:
> I'm trying to use the FROM keyword in a way that I think it should be
> able to be used, but I'm getting compilation errors. Here are the 2
> ways that I'm getting stumped on:
>
> exist SomeObject(val == "5") from dao.find(99)
>
>
> and
>
> not AnotherObject(val == "Dad") from anotherDao.find(1)
>
>
> If I remove the exist and not, everything compiles okay. With the first
> test, I'd like to ensure an object exists AND it has a value of 5.
> dao.find could return a null, so I don't want the test to crap out
> because of a NullPointerException.
>
> With the second one, I want to ensure the collection returned from
> anotherDao.find call does not have an AnotherObject instance with a
> value of "Dad".
>
> These seem like fairly trivial things to test for, so I'm fairly certain
> there's an appropriate way to structure these test. Any help is
> appreciated.
>
> Thanks all.
>
> Eric
> _______________________________________________
> 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