cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evgeny Ryabitskiy (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (CAY-1279) Passing null values in query parameters
Date Thu, 24 Sep 2009 07:03:16 GMT

    [ https://issues.apache.org/jira/browse/CAY-1279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12759039#action_12759039
] 

Evgeny Ryabitskiy edited comment on CAY-1279 at 9/24/09 12:02 AM:
------------------------------------------------------------------

Here is a patch to fix this problem.
After this patch behavior will be same whenever you set JDBC type in bind or not (except case
when you set wrong JDBC type).

I mean if you pass null in parameter or not pass anything you will get NULL in binding.

      was (Author: apparition):
    Here is a patch to fix this problem.
After this patch behavior will be same whenever you set JDBC type in bind or not.

I mean if you pass null in parameter or not pass anything you will get NULL in binding.
  
> Passing null values in query parameters
> ---------------------------------------
>
>                 Key: CAY-1279
>                 URL: https://issues.apache.org/jira/browse/CAY-1279
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Cayenne Core Library
>    Affects Versions: 1.2.5, 2.0.5, 3.0 beta 1, 3.0
>            Reporter: Evgeny Ryabitskiy
>             Fix For: 2.0.5
>
>         Attachments: CAY-1279-2.0.patch
>
>
> 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?!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message