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.
When trying to generate JAVA sources from DB model (Oracle 10) if the primary key of the table is of type RAW(16) (useful for UUID) the generated code look as: @Id @Lob @Column(name = "ID", nullable = false) private [B id; That code won't compile (they type fails). To reproduce: 1) Create the table (Oracle 10) CREATE TABLE "A" ( "ID" RAW(16) NOT NULL DEFAULT sys_guid(), "KEY" VARCHAR2(255), CONSTRAINT "PK_A" PRIMARY KEY ("ID") ) 2) Create a new EJB project 3) Create New->Entity Classes from database 4) Keep defaults for everything 5) Try to compile the generated code
Created attachment 37039 [details] Image of the error in Netbeans
The type of the field should be byte[] or something else?
Correct, the field should be byte[]
Fixed. Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEntityMember.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEntityMember.java,v <-- DbSchemaEntityMember.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/SQLType.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/SQLType.java,v <-- SQLType.java new revision: 1.3; previous revision: 1.2 done