Return-Path: Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: (qmail 21380 invoked from network); 10 Sep 2008 13:14:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Sep 2008 13:14:46 -0000 Received: (qmail 3534 invoked by uid 500); 10 Sep 2008 13:14:37 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 3502 invoked by uid 500); 10 Sep 2008 13:14:37 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 3472 invoked by uid 99); 10 Sep 2008 13:14:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 06:14:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Sep 2008 13:13:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CEFD5234C1D3 for ; Wed, 10 Sep 2008 06:14:11 -0700 (PDT) Message-ID: <868823250.1221052451845.JavaMail.jira@brutus> Date: Wed, 10 Sep 2008 06:14:11 -0700 (PDT) From: "Andrey Razumovsky (JIRA)" To: dev@cayenne.apache.org Subject: [jira] Created: (CAY-1105) Expressions in-memory automatic type convertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Expressions in-memory automatic type convertion ----------------------------------------------- Key: CAY-1105 URL: https://issues.apache.org/cayenne/browse/CAY-1105 Project: Cayenne Issue Type: Improvement Components: Cayenne Core Library Affects Versions: 3.0 Reporter: Andrey Razumovsky Assignee: Andrus Adamchik Attachments: patch-test-Expr.txt The root of the problem is difference in behavior of expressions on server (using queries) and in-memory (using Expression.match(...). All DBMS I know support automatic type convertion, i.e. if I write SELECT * FROM a WHERE intProperty='1' everything will go OK. So, if I write an expression like [note quotes at 1!] ExpressionFactory.greaterExp("intProperty", "1") it will go normally with a query, but will result in an exception if I try to invoke match(...). I suggest to make the behavior similiar and therefore implement automatic type convertion on expressions. I've submitted a patch with a number of tests, which all fail. I think the must all succeed. Comments and other expression improvement suggestions are welcomed -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.