facebook

Number in the Database that are bigger then an Integer

  1. MyEclipse IDE
  2.  > 
  3. Spring Development
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #310046 Reply

    Hi

    I have just used the spring scaffolding, to generate code from a pre existing database. There are some fields within the database that store numbers in them that are bigger than will fit into a Java Integer and so need to be loaded into a Java Long, but I can see no way of setting anything other than Integer in the DSL editor, so if I change the generated code to be Longs then as soon as I compile it all gets changed back to Integer.

    How can I get round this issue with out scraping the use of the scaffolding which I really don’t want to do. Is there any way to add Long to the dropdown list used within the DSL editor for the domain object.

    Any pointers would be a big help

    Regards

    David

    #310050 Reply

    Heflin Hogan
    Member

    Hi David,

    You should be able to modify the generated code without it being changed back. This is a known issue with 8.5 that has been fixed for 8.6. I don’t have a good work around for 8.5 at the moment, but you can try turning off the code generation for your domain object via the code generation tab in the editor. Just be aware that it will turn itself back on (another bug resolved in 8.6), but I’ve found that it’s easier to change on the panel rather than changing the generated source again.

    As far adding Java Long to the DSL editor dropdown, I can pass that to our engineering staff as a feature request.

    Regards,
    Heflin

    #310051 Reply

    Hi Heflin

    Thanks for that, I will give that a try I am using 8.6M2 at the moment. It would be good to have the larger types in the list both Long and also Float as databases ( in this case DB2 9.5 ) will handle values that will just not fit inside an Integer of a Double. So if this can be added it would be a great help.

    Regards

    David

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Number in the Database that are bigger then an Integer

You must be logged in to post in the forum log in