You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "Kasper Sørensen (JIRA)" <ji...@apache.org> on 2018/01/09 06:47:03 UTC

[jira] [Resolved] (METAMODEL-1169) MS Sql and queries with WHERE part on datetime or timestamp columns lost milliseconds precision

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

Kasper Sørensen resolved METAMODEL-1169.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 5.0.1
                   4.6.1

> MS Sql and queries with WHERE part on datetime or timestamp columns lost milliseconds precision
> -----------------------------------------------------------------------------------------------
>
>                 Key: METAMODEL-1169
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-1169
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.5.5
>            Reporter: Jakub Neubauer
>             Fix For: 4.6.1, 5.0.1
>
>
> An example, where a query is constructed that compares some `datetime` column with a value.
> {code:java}
> Query q = ...
> java.util.Date datetimeValue = createDatetime('2017-01-01 12:00:00.500');
> q.where(column, OperatorType.GREATER_THAN, datetimeValue);
> {code}
> If there is a row with  the appropriate column value for example `2017-01-01 12:00:00.157`, this row should NOT be selected, but currently it IS, since the milliseconds are trimmed to 0 in the query operand.
> Only on MS SQL database. The problem is probably in `SQLServerQueryRewriter.rewriteFilterItem` class & method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)