I have gathered feedback from various places and as expected everyone
has his favorite best solution.
I am on the fence to support this:
- @Max with long not supporting double and float
- @MaxDecimal with String (BigDecimal style) not supporting double
and float
- same for min
WDTY?
Bett
On Thu, 05 Mar 2009 10:30:49 +0100, Elias Ross
wrote:
@Max("12.5")
BigDecimal someNumber;
Since the BigDecimal and BigInteger have String constructors that are
well defined, a String representation seems fine.
The string representation is probably less intuative though, especially
for i
On Wed, Mar 4, 2009 at 4:20 PM, Emmanuel Bernard wrote:
> I mean we could but we would need to rely on the string representation
>
> @interface Max {
> String value()
> }
>
> @Max("12.5")
> double someNumber;
There's very few domains where you want to be validating user input
and storing it as
Using the String value could be a good idea also for double,
not very clean but safe.
2009/3/5 Emmanuel Bernard :
> I mean we could but we would need to rely on the string representation
>
> @interface Max {
> String value()
> }
>
> @Max("12.5")
> double someNumber;
>
>
> On Mar 4, 2009, at 19:1
Unfortunately, you can't support Big* as they are not expressible in
annotations
@interface Max {
BigDecimal value();
}
does not compile.
On Mar 4, 2009, at 19:14, Elias Ross wrote:
On Wed, Mar 4, 2009 at 3:49 PM, Emmanuel Bernard > wrote:
[Follow up with Sebastian]
Well good point and
I mean we could but we would need to rely on the string representation
@interface Max {
String value()
}
@Max("12.5")
double someNumber;
On Mar 4, 2009, at 19:17, Emmanuel Bernard wrote:
Unfortunately, you can't support Big* as they are not expressible in
annotations
@interface Max {
On Wed, Mar 4, 2009 at 3:49 PM, Emmanuel Bernard wrote:
> [Follow up with Sebastian]
>
> Well good point and frankly I do not know :)
> 1. do we support float and double for @Min / @Max?
> 2. if 1 is yes, I'd be inclined to say the value should be double but that's
> not fully automatic.
How woul
[Follow up with Sebastian]
Well good point and frankly I do not know :)
1. do we support float and double for @Min / @Max?
2. if 1 is yes, I'd be inclined to say the value should be double but
that's not fully automatic.
PS: I don't think the issue is addressable per se, it has to be
unders
On Feb 27, 2009, at 15:11, Hardy Ferentschik wrote:
On Fri, 27 Feb 2009 15:01:40 +0100, Emmanuel Bernard > wrote:
values are of type long.
Someone asked to move to double. What do you think?
Kind of makes sense, since we allow to put @Min and @max onto
decimal fields.
Are there any disa
On Fri, 27 Feb 2009 15:01:40 +0100, Emmanuel Bernard
wrote:
values are of type long.
Someone asked to move to double. What do you think?
Kind of makes sense, since we allow to put @Min and @max onto decimal
fields.
Are there any disadvantages or problems with moving to double?
--Hardy
values are of type long.
Someone asked to move to double. What do you think?
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev
11 matches
Mail list logo