Results 1 to 4 of 4

Thread: java.math.BigDecimal usage question

  1. #1
    Join Date
    Feb 2010
    Posts
    3

    Default java.math.BigDecimal usage question

    i have something like this in the roo shell:

    field number --type java.math.BigDecimal --fieldName salestax --notNull --class invoice

    which gives me in the database:

    | salestax | decimal(19,2) | YES | | NULL | |

    what if i need a field with more decimal places?

    like decimal(19,8) ?

    thx in advance

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    You can use http://java.sun.com/javaee/5/docs/ap...ce/Column.html to specify extra precision if needed. Just edit the .java file and add the annotation above the field and it should work.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Feb 2010
    Posts
    3

    Default bug?

    thx, thats working now.. what doesnt seem to work are @NotNull Annotiations,
    they doesnt seem to get recognized. Changing @NotNull to @Column(nullable=false, length=128) is working, the database is created correct..
    im using mysql and hibernate.

  4. #4
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Glad the big decimal is working for you now. As for your other question see my response to your thread here: http://forum.springsource.org/showpo...25&postcount=2

    HTH,
    Stefan
    Stefan Schmidt
    Software Engineer, Spring Roo
    SpringSource - a division of VMware
    twitter @schmidtstefan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •