| Summary: | ddl generation @Column - length attribute ignored if updatable=false,insertable=false | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | TimM <tim.martin> |
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | tim.martin, tom.ware |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
The same occurs in build 2.3.0.v20110516-r9382 it appears a workaround is to specifiy the columnDefinition attribute eg @Column(name=BlockDeblock.DATA, insertable=false,updatable=false, length=4000, columnDefinition="VARCHAR(4000)") private String data ; Although this is far from ideal as we have about 300 fields specified as insertable=false,updatable=false Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Build Identifier: 2.2.0.v20110202-r8913 if I have for eg @Entity @Table(name="COREPMA") public class Parameter { @Id @Column(name=BlockDeblock.KEY, length=47) private String key ; @Column(name=BlockDeblock.DATA, length=4000, insertable=false,updatable=false) private String data ; } then the ddl generated uses the default length (255) [EL Fine]: 2011-06-03 09:05:57.021--ServerSession(16135119)--Connection(14145720)--Thread(Thread[Main Thread,5,main])--CREATE TABLE COREPMA (ORA2_KEY VARCHAR(47) NOT NULL, ORA2_DATA VARCHAR(255), PRIMARY KEY (ORA2_KEY)) if i remove the insertable=false,updatable= false then it produces CREATE TABLE COREPMA (ORA2_KEY VARCHAR(47) NOT NULL, ORA2_DATA VARCHAR(4000), PRIMARY KEY (ORA2_KEY)) nb the length is now correct. I can't really think of any valid reason why ? This means that when running tests against hsqldb 2.2.2 that we can not insert test data into that table via sql over 255 chars long. Reproducible: Always