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 5D72AF85E for ; Mon, 22 Apr 2013 17:36:45 +0000 (UTC) Received: (qmail 7753 invoked by uid 500); 22 Apr 2013 17:36:45 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 7723 invoked by uid 500); 22 Apr 2013 17:36:45 -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 7715 invoked by uid 99); 22 Apr 2013 17:36:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 17:36:45 +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 (athena.apache.org: domain of reich.markus@gmail.com designates 209.85.128.180 as permitted sender) Received: from [209.85.128.180] (HELO mail-ve0-f180.google.com) (209.85.128.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Apr 2013 17:36:41 +0000 Received: by mail-ve0-f180.google.com with SMTP id pb11so680722veb.25 for ; Mon, 22 Apr 2013 10:36:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=gRhl1D7Yu8snfme6om27TeGarTt0qF2eFzxLyijXudU=; b=0gNkTh/sxBsN/ATs5+VXGBNLncOkzgcy4bzSKhh582rT0f40uy7R7traZpOaBFW58R 4Pw+Kcs4ttduD+8UCfwPhC4e9QHpb6xfvq+g9F1poAmW0bjbcphw8cgXMSHngnRvjSu0 Ap8ZEJ5vmGXOPKOz8ecOoO9LE7niS6luKOGRaNiatDWfhRvDVeGN0dQ7hAc62s7lMcmQ HmeP4QknQa4mOeL2DAcpeekSHGqURz/Bj7z2442TEYETG8ZY6X4n2sTwUYhtrshISLL7 u9CEFrm2rw5iTaGy5MffoukHqgIEfgteteCPbtCZAZ79J8tnWAW2OquPDUcFXynEcJ6r QxLg== X-Received: by 10.220.103.209 with SMTP id l17mr19647423vco.39.1366652180146; Mon, 22 Apr 2013 10:36:20 -0700 (PDT) MIME-Version: 1.0 Sender: reich.markus@gmail.com Received: by 10.52.230.6 with HTTP; Mon, 22 Apr 2013 10:36:00 -0700 (PDT) In-Reply-To: <4C477FFD-D9A8-44D3-AA03-92C993001109@objectstyle.org> References: <4C477FFD-D9A8-44D3-AA03-92C993001109@objectstyle.org> From: Markus Reich Date: Mon, 22 Apr 2013 19:36:00 +0200 X-Google-Sender-Auth: YpSpiFpZ1BRC0AGIR0jM96_Tt4k Message-ID: Subject: Re: Convert Oracle Type NUMBER to java.lang.Boolean To: user@cayenne.apache.org Content-Type: multipart/alternative; boundary=047d7b342de0bca03404daf681f4 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b342de0bca03404daf681f4 Content-Type: text/plain; charset=UTF-8 ok, thx for reply, I'm using version 3.1 B2, I'll try the newest version Meex 2013/4/22 Andrus Adamchik > Actually this should just work. No hacks are needed. But it should be > mapped as NUMBER on the DbEntity side, and as java.lang.Boolean - on the > ObjEntity side. If it doesn't, it is a bug that we need to fix. > > Andrus > > On Apr 22, 2013, at 4:51 AM, Markus Reich > wrote: > > 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 > > -- *Markus Reich* Moosbach 28/2 6392 St. Jakob i.H. www.markusreich.at / www.meeximum.at markus.reich@markusreich.at --047d7b342de0bca03404daf681f4--