Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F38A10296 for ; Mon, 22 Apr 2013 08:52:03 +0000 (UTC) Received: (qmail 35472 invoked by uid 500); 22 Apr 2013 08:52:03 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 34991 invoked by uid 500); 22 Apr 2013 08:52:01 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 34954 invoked by uid 99); 22 Apr 2013 08:52:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 08:52:00 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of reich.markus@gmail.com designates 209.85.220.169 as permitted sender) Received: from [209.85.220.169] (HELO mail-vc0-f169.google.com) (209.85.220.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 08:51:53 +0000 Received: by mail-vc0-f169.google.com with SMTP id gd11so608834vcb.28 for ; Mon, 22 Apr 2013 01:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:from:date:x-google-sender-auth :message-id:subject:to:content-type; bh=JHifwDFk6bJLLuDCwrQ38bhqTABoWB8EBwpqiTyT95E=; b=Bo72Fxl+Qdk8uexOvbRD7d2nEhmxThe/0A6PHlbvywnzdQJhgCJ37qQH65N4vvRrlp hmJptWUtjVUNC6atb/VMvhgGDA1InNsuG8Dc8ZR4KSnKZi54E/EBmtLg3VpcfN6899ZS pxh8KEDTeSwEFqQqM/VmmM5FO4rSFGd1N/CW0bXQzguYXm1nud1CRUmIIsPOnLigY768 Ss45eOmkzlWrSYO9C3Ti6Pzyll8NIb87d0/H9rzx5ePzLv3z6MwC8RVcg8/3k16f9e5a tSBbtHvfGpbhoQpEY8I5jfBQd7ltD5zVORkbbQ2YlCDtP1//0Mbg/+VBAPsZyoxlLAuv u+VA== X-Received: by 10.58.144.170 with SMTP id sn10mr13670071veb.7.1366620692824; Mon, 22 Apr 2013 01:51:32 -0700 (PDT) MIME-Version: 1.0 Sender: reich.markus@gmail.com Received: by 10.52.230.6 with HTTP; Mon, 22 Apr 2013 01:51:12 -0700 (PDT) From: Markus Reich Date: Mon, 22 Apr 2013 10:51:12 +0200 X-Google-Sender-Auth: LDPEVTXej3hDM6S-wZ0C0Ozeonk Message-ID: Subject: Convert Oracle Type NUMBER to java.lang.Boolean To: user@cayenne.apache.org Content-Type: multipart/alternative; boundary=047d7b672198f0742904daef2c65 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b672198f0742904daef2c65 Content-Type: text/plain; charset=UTF-8 Hi, I've a problem with using boolean values in my cayenne class. In Oracle DB the field has type NUMBER and contains only 0 or 1 as value. Now I thought I can map this to a Boolean? I came to this because it also works when I select with an Expression: ExpressionFactory.matchExp(MiiPickingcontainer.DELETED_PROPERTY, false)); But when I make a check with getDeleted()==false, it doesn't work as getDeleted() always returns false? What would be the best approach to transform a Oracle NUMBER to a Boolean? Markus --047d7b672198f0742904daef2c65--