This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 111519

Summary: @Column annotation should contain length attribute
Product: javaee Reporter: Jan Horvath <jhorvath>
Component: PersistenceAssignee: Dongmei Cao <dongmeic>
Status: RESOLVED FIXED    
Severity: blocker CC: abadea
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Implementation for string columns

Description Jan Horvath 2007-07-31 17:16:56 UTC
Length attribute should be added in @Column annotations in classes generated by Entity Classes from Database. Without this attribute, database recreated 
using toplink "Create Tables" option differs from the original DB.
Comment 1 Andrei Badea 2007-10-30 14:58:56 UTC
Created attachment 52006 [details]
Implementation for string columns
Comment 2 Andrei Badea 2007-10-30 15:01:09 UTC
I implemented the length attribute for string columns, and the implementation for the precision and scale attributes
would be similar. However, I'm a bit wary to commit it so late in the release cycle. The generated code is highly
dependent on the implementations of JDBC drivers, so it needs to be tested properly by both QE and users. So I propose
postponing this for the next release.
Comment 3 Dongmei Cao 2008-05-15 21:56:38 UTC
Checked in the attached implementation by Andrei.
http://hg.netbeans.org/main/rev/c805c89ea81e
Comment 4 Dongmei Cao 2008-05-16 23:11:07 UTC
Please verify it in 6.5 M1
Comment 5 Dongmei Cao 2008-06-10 01:02:23 UTC
The "length" attribute will be generated only if the Attributes for Regenerating schema is checked in the very last step
of the wizard.