yeah we have a problem with reserved words. In the next RC, it may be
resolved.

In the mean time, avoid the reserved words. In RC2, you will also be able to
do: Something(getEnd == "foo") which will be the same as Something(end
=="foo")

(ie it lets you use any method name, as an alternative to the property name,
as long as the method returns a value etc - and of course the method should
be idempotent, as it is really just a field value).

On 4/11/06, Mitch Christensen <[EMAIL PROTECTED]> wrote:
>
> I can't seem to reproduce the error I was seeing earlier, but referencing
> a
> property named 'end' causes my rule never to fire.
>
> If I simply change the property name to 'end2' and modify the rule to
> reference 'end2', the rule fires as expected.
>
> -Mitch
> -----Original Message-----
> From: Michael Neale [mailto:[EMAIL PROTECTED]
> Sent: Saturday, April 08, 2006 2:37 AM
> To: [email protected]
> Subject: Re: [drools-user] 'end' in a rule specification
>
> Can you post your error?
>
> On 4/8/06, Mitch Christensen <[EMAIL PROTECTED]> wrote:
> >
> > Hey,
> >
> > I have a java object that has an 'end' property (i.e. supports
> setEnd(long
> > end) and getEnd() methods).
> >
> > When I write the following rule,
> >
> > rule "I can't use 'end' here"
> >         when
> >                 $qo : QueryObject(end > 0)
> >         then
> >                 ...
> > End
> >
> > I get an error.  I had to re-write my object to change the 'end'
> property
> > to
> > endTime to get things to work.
> >
> > Is this a DRL syntax problem, or is there a way I can use an 'end'
> > property
> > without confusing the parser?
> >
> > Thanks.
> > -Mitch
> >
> >
>
>

Reply via email to