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

Improve SQL Logging Output when Optimistic Locking is Used

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1 [LEGACY]
    • 1.1 [LEGACY]
    • Core Library
    • None
    • All

    Description

      When Cayenne outputs SQL for logging and optimistic locking is being used, Cayenne smartly doesn't create bindings for null values (generates "IS NULL" for the SQL), but the "bind:" output immediately following shows "NULL" in the output instead of omitting it.

      Example:

      INFO QueryLogger:315 - UPDATE Foo SET bar = ? WHERE bar = ? and baz IS NULL
      INFO QUeryLogger:337 - [bind: 2, 1, NULL]

      Since Cayenne generated "IS NULL for the SQL, it is not needed (and in fact Cayenne does not include it) as a bind parameter, but the logging doesn't reflect this, which is confusing.

      Attachments

        Activity

          People

            blacknext Michael Gentry
            blacknext Michael Gentry
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: