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.
Summary: | Unsigned field not generated correctly in Entity Beans | ||
---|---|---|---|
Product: | javaee | Reporter: | calvin_x_cheng <calvin_x_cheng> |
Component: | Persistence | Assignee: | Andrei Badea <abadea> |
Status: | NEW --- | ||
Severity: | blocker | CC: | pjiricka |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
calvin_x_cheng
2008-01-31 19:20:13 UTC
I believe this belongs to j2ee support. Just to be clear, is this about the "EJB entity beans" in an J2EE 1.4 EJB module? Or does this relate to the "Java Persistence", which is a part of Java EE 5? I was generating classes for Java EE5. Ok, in this case this belongs to Java Persistence, changing the category accordingly. I don't know a database-independent way to detect an unsigned column. Both INT and INT UNSIGNED are mapped to java.sql.Types.INTEGER, and both have a column size of 10. The only way I can think of is to look at the TYPE_NAME column of java.sql.DatabasMetaData.getColumns(), but that would make the generation process database-dependent. It currently isn't, and there is no clean, practical way to make it so for 6.1. I would prefer avoiding a hack like if (isMySQL() && typeName.contains("UNSIGNED")). |