cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Huss (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-1987) Widen types before performing in-memory evaluation of qualifiers using j.l.Number subclasses
Date Mon, 16 Mar 2015 14:28:38 GMT

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

John Huss closed CAY-1987.
--------------------------
       Resolution: Fixed
    Fix Version/s: 4.0.M3
         Assignee: John Huss

> Widen types before performing in-memory evaluation of qualifiers using j.l.Number subclasses
> --------------------------------------------------------------------------------------------
>
>                 Key: CAY-1987
>                 URL: https://issues.apache.org/jira/browse/CAY-1987
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Core Library
>    Affects Versions: 4.0.M2
>         Environment: trunk
>            Reporter: John Huss
>            Assignee: John Huss
>            Priority: Minor
>             Fix For: 4.0.M3
>
>         Attachments: 0001-CAY-1987-Widen-types-before-performing-in-memory-eva.patch
>
>
> There is a difference in the behavior of Expressions evaluated in memory versus by the
database when comparing attributes with a type like java.lang.Short with a literal of type
java.lang.Integer.  In memory Short(1) != Integer(1), but they are equal in the database.
 Using a less strict comparison in memory would be preferable. 
> I figured there would be an open source implementation of this somewhere that calculates
the widest type and compares the two values, but I couldn't find one.  I imagine you could
just call number.doubleValue() and compare that, but that seems sketchy.  
> If you think this is worth doing I could try writing an implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message