cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Convert Oracle Type NUMBER to java.lang.Boolean
Date Mon, 22 Apr 2013 17:39:12 GMT
To the best of my knowledge thus should work on 3.1B2. 

On Apr 22, 2013, at 1:36 PM, Markus Reich <markus.reich@markusreich.at> wrote:

> ok, thx for reply, I'm using version 3.1 B2, I'll try the newest version
> 
> Meex
> 
> 
> 2013/4/22 Andrus Adamchik <andrus@objectstyle.org>
> 
>> 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 <markus.reich@markusreich.at>
>> 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


Mime
View raw message