Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-970

Missing date coercion in constraint using an instance field or a declaration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • None
    • None
    • NEW
    • NEW

    Description

      Automatic String to Date coercion is not performed in case the accessed field is not a getter method but an instance field of the class as in:

         public class Person {
             public java.util.Date date;
         }
      
          rule x when
             Person( date < "1-Jan-2000" )  // Error flagged here, if...
          then ...end
      

      or when the class has proper a getter method but the constraint is expressed with a binding declaration as in:

          rule x when
               Person( $date: date, $date < "1-Jan-2000" )
          then ...end
      

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: