Bug 203278

Summary: Attribute Type Selection for generated Entities
Product: [WebTools] Dali JPA Tools Reporter: Shaun Smith <shaun.smith>
Component: JPAAssignee: Neil Hauge <neil.hauge>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P2 CC: eclipse.dserodio, eclipsebz.20.trab_78, neil.hauge, snekse+bugs.eclipse
Version: 1.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Shaun Smith CLA 2007-09-13 10:54:00 EDT
The following was posted on the TopLink forum: http://forums.oracle.com/forums/thread.jspa?messageID=2063838


We use Dali to generate Entities from tables. When we do this, every numeric database field is mapped as a BigDecimal type. Most of the numeric fields in the database have only 7 digits, so they should fit in a normal Integer or int. We have a lot of numeric fields, so we don't want to manually edit all entities. Is there a way to tell Dali that it should use Integers for database fields which fit?

We have an IBM AS/400 database and are using TopLink JPA as EJB3 implementation.

Best regards,
Bart Kummel
Comment 1 Shaun Smith CLA 2007-09-13 10:57:12 EDT
Dali needs to be smarter about selecting the appropriate Java type for attributes and provide a way to override/control the selection.  In the example Bart cites, the database data size would fit into a much smaller Java type, even a primitive.
Comment 2 Neil Hauge CLA 2008-05-08 17:08:09 EDT
Too big for 2.0.  Look at for next release.
Comment 3 Neil Hauge CLA 2011-07-01 16:23:25 EDT
Moving JPA specific bugs to new JPA component in bugzilla.
Comment 4 Neil Hauge CLA 2011-10-07 12:51:58 EDT
Targeting to Juno release.