Bugs item #512760, was opened at 2002-02-04 06:08 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=512760&group_id=22866
Category: JBossCMP Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Matt (mpetteys) Assigned to: Nobody/Anonymous (nobody) Summary: Patch: Add NOT NULL for pk in createSQL Initial Comment: When tables with are created with primary keys in CMP, currently no column modifiers are used to create the table. The following is sql that is used to create "table1" which has a primary key of "id".. CREATE TABLE table1 (id VARCHAR(255) BINARY, data2 BLOB, data2 BLOB, CONSTRAINT pk_table1 PRIMARY KEY (id)) The current version of MySQL blows up on this because the column "id" should not be null because it is primary key column. The attached patch checks the columns to see if they are a primary key column and adds the "not null" modifier if they are. CREATE TABLE table1 (id VARCHAR(255) BINARY NOT NULL, data2 BLOB, data2 BLOB, CONSTRAINT pk_table1 PRIMARY KEY (id)) I believe most db supports "not null" so this should work universally without having to worry about DB specific syntax and I don't think that EJBs allow null primary keys so that shouldn't be a problem. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=512760&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
