Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1139

EJBQL condition translation - must track the type of condition

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M6
    • Core Library
    • None

    Description

      When translating an EJBQL condition we need to keep a stack tracing the type of condition. One place where this is important is EJBQLConditionTranslator.processParameter(), as currently it hardcodes the type to VARCHAR for null parameters:

      context.append(" #bind($").append(boundName).append(" 'VARCHAR')");

      This leads to errors, e.g. a postgresql 8.3 error:

      Tests in error:
      testCompareToNull(org.apache.cayenne.access.DataContextEJBQLIsNullTest)

      There may be other places where such info will be useful

      Attachments

        1. ErrEJBQLIsNullTest.txt
          6 kB
          Olga Tkacheva
        2. ErrEJBQLIsNullTest2.txt
          9 kB
          Olga Tkacheva
        3. ErrEJBQLIsNullTest2.txt
          9 kB
          Olga Tkacheva

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment