You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Andrus Adamchik (Jira)" <ji...@apache.org> on 2021/03/09 06:39:00 UTC

[jira] [Updated] (CAY-2700) Convert expression String parameters to date[time] when appropriate

     [ https://issues.apache.org/jira/browse/CAY-2700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrus Adamchik updated CAY-2700:
---------------------------------
    Description: 
When parsing Cayenne expressions we do not attempt any type conversion of parameter values. This is usually not a problem for Cayenne users, as they can pass parameters already converted to a need type (e.g. LocalDateTime). However this is an [issue for frameworks like Agrest|https://groups.google.com/g/agrest-user/c/MxFktjHhXGI] that can not do proper parameter conversion as they are not aware of the left-hand side of an expression matched with the parameter. 

So let's implement a more robust conversion inside the Cayenne stack. We can probably do it right in the ExtendedType. E.g. ExtendedType for String can do a date[time] conversion based on the desired JDBC type.

  was:
When parsing Cayenne expressions we do not attempt any type conversion of parameter values. This is usually not a problem for Cayenne users, as they can pass parameters already converted to a need type (e.g. LocalDateTime). However this is an [issue for frameworks like Agrest|https://groups.google.com/g/agrest-user/c/MxFktjHhXGI] that can not do proper parameter conversion as they are not aware of left-hand side of the expression matched with the parameter. 

So let's implement a more robust conversion inside the Cayenne stack. We can probably do it at the levels as low as ExtendedType (e.g. ExtendedType for String can do a date[time] conversion based on the JDBC type).


> Convert expression String parameters to date[time] when appropriate
> -------------------------------------------------------------------
>
>                 Key: CAY-2700
>                 URL: https://issues.apache.org/jira/browse/CAY-2700
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Andrus Adamchik
>            Priority: Major
>
> When parsing Cayenne expressions we do not attempt any type conversion of parameter values. This is usually not a problem for Cayenne users, as they can pass parameters already converted to a need type (e.g. LocalDateTime). However this is an [issue for frameworks like Agrest|https://groups.google.com/g/agrest-user/c/MxFktjHhXGI] that can not do proper parameter conversion as they are not aware of the left-hand side of an expression matched with the parameter. 
> So let's implement a more robust conversion inside the Cayenne stack. We can probably do it right in the ExtendedType. E.g. ExtendedType for String can do a date[time] conversion based on the desired JDBC type.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)