Bug 203278 - Attribute Type Selection for generated Entities
Summary: Attribute Type Selection for generated Entities
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P2 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-09-13 10:54 EDT by Shaun Smith CLA
Modified: 2013-09-04 12:23 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.