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

Generic select queries silently convert result to nulls if no PK column found

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.B1, 4.1.M1
    • Fix Version/s: 4.0.B2, 4.1.M1
    • Component/s: Core Library
    • Labels:
      None

      Description

      SQLTemplate by default tries to convert result into object (selectDataRows set to false),
      however if there are no PK columns for required entity in result this lead to null without any hit to the user. That definitely leads to confusion, see this SO question for example https://stackoverflow.com/questions/45907666/select-custom-data-with-cayenne-return-empty-lines
      Problem is that EJBQL uses very same logic for result conversion, so this should be fixed keeping in mind that null is a valid result in case of some OUTER JOIN, or missing to-one relationship.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ntimofeev Nikita Timofeev
                Reporter:
                ntimofeev Nikita Timofeev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: