[OS-JIRA] Created: (CAY-352) Incorrect prefetching qualifier when expression contains null

From: jira-norepl..bjectstyle.org
Date: Mon Aug 22 2005 - 16:32:35 EDT

  • Next message: Mike Kienenberger: "FYI: Changing from mkienen..laska.net to mkienenb@gmail.com"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-352

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-352
        Summary: Incorrect prefetching qualifier when expression contains null
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Fix Fors:
                 1.2 [DEV]
       Versions:
                 1.1
                 1.2 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Andrus Adamchik

        Created: Mon, 22 Aug 2005 4:32 PM
        Updated: Mon, 22 Aug 2005 4:32 PM

    Description:
    Originally described here:

    http://objectstyle.org/cayenne/lists/cayenne-user/2005/08/0039.html

    Using a regular prefetch on qualifiers that compare to nulls, incorrectly prunes null comparison from the prefetch query.

    E.g.:

     Expression exp = Expression.fromString("estimatedPrice = null");
     SelectQuery q = new SelectQuery(Painting.class, exp);
     q.addPrefetch("toArtist");

    generates the following SQL:

    SELECT t0.ESTIMATED_PRICE, t0.PAINTING_TITLE, t0.ARTIST_ID, t0.GALLERY_ID, t0.PAINTING_ID FROM PAINTING t0 WHERE t0.ESTIMATED_PRICE IS NULL

    SELECT t0.ARTIST_NAME, t0.DATE_OF_BIRTH, t0.ARTIST_ID FROM ARTIST t0

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Mon Aug 22 2005 - 16:32:36 EDT