Re: 5.2.3 Boolean Bugs?????
Re: 5.2.3 Boolean Bugs?????
- Subject: Re: 5.2.3 Boolean Bugs?????
- From: steve stout <email@hidden>
- Date: Wed, 17 Mar 2004 10:50:04 -0700
Yes, setting the ValueType to 'B' works and takes care of the
ClassCastException, but the problem I'm having is that the scale of the
BigDecimal isn't being set correctly. So, for example, if I have a
whole number value like 3, the value that's returned comes out as
3.000000000. The default behavior of BigDecimal is to chop off those
extra digits after the decimal. So somewhere in the instantiation of
the BigDecimal, setScale() is being called. Unfortunately, just
setting the scale in EOModeler doesn't work.
In 5.2.2, the solution was to set the ValueType to 'd', which would
create a BigDecimal, but the scale would be set properly. This doesn't
work in 5.2.3.
The reason why this is a problem is mainly for display purposes. If I
have a value that uses a formatter of "0.##" because I _sometimes_ need
to show the digits after the decimal, it will now always show the
zeros. In 5.2.2, it would show "3" with a formatter of "0.##", but now
that the scale is being set too high, it always shows "3.00"
I can't remember, but I think that this also causes a problem with
comparing 2 BigDecimals. Because 3 != 3.000000000. I'll have to
double check on this though.
.steve
On Mar 17, 2004, at 9:02 AM, Robert Walker wrote:
This behavior is again confirmed. I installed the 5.2.3 update on my
test development box and found this problem.
This appears [SO FAR] to be a bug FIX not a new bug. I did not have
the "B" value type set for my BigDecimal's in my model. WO 5.2.3 now
throws the class cast exception, as it probably should have in 5.2.2.
I could be wrong about this. However, adding the correct ValueType
("B" in this case) fixes the problem.
On Mar 17, 2004, at 8:40 AM, Travis Britt wrote:
On Mar 17, 2004, at 8:09 AM, Anders Peterson wrote:
I upgraded to WO 5.2.3 today on my Mac OS x 10.3.3 development
machine.
I get ClassCastExceptions exceptions for (at least some)
BigDecimals. I don't have Booleans.
I also see this behavior, after upgrading dev to 5.2.3.
I've got an EO with an attribute modeled as NSDecimalNumber, which
maps to a FLOAT column in the DB. The code output by EOModeler casts
this attribute to a BigDecimal, which throws the exception. Worked in
5.2.2.
tb
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
--
Sincerely,
Robert Walker
Programmer
Bennett Technology Group
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.