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

Passing null values in query parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.5, 3.0 beta 1, 3.0, 2.0.5
    • 1.2.5, 3.0 beta 1, 2.0.5
    • Core Library
    • None

    Description

      Example1:

      INSERT INTO TABLE1 (id, NullableColumn) values (10, $MyNullValue)

      If I put null in MyNullValue parameter I will get: bad formed query because of how Velocity do merge with templates.
      But Cayenne is using #bind directive, so....

      Example2:

      INSERT INTO TABLE1 (id, NullableColumn) values (10, #bind($MyNullValue))

      If I put null in MyNullValue parameter I will get Bind Exception.

      So.... how can I insert null in my column using Cayenne?!

      Attachments

        1. CAY-1279-2.0.patch
          2 kB
          Evgeny Ryabitskiy
        2. CAY-1279-2.0+JUnitTest.patch
          8 kB
          Evgeny Ryabitskiy

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: