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 - @Column annotation should contain length attribute
Summary: @Column annotation should contain length attribute
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dongmei Cao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-31 17:16 UTC by Jan Horvath
Modified: 2008-06-10 01:02 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Implementation for string columns (4.96 KB, text/plain)
2007-10-30 14:58 UTC, Andrei Badea
Details

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