posted 18 years ago
Hi,
When I use mye JPA Entities to generate tables in DB2, I get an error "-540". This error occurs because:
"THE DEFINITION OF TABLE <table name> IS INCOMPLETE BECAUSE IT LACKS A PRIMARY INDEX OR A REQUIRED UNIQUE INDEX"
The work around has been to create a unique index after the table is created:
CREATE UNIQUE INDEX tablename_PKEY
ON tablename
(
ID asc
)
When I've done this, I get another strange error stating that the index parameter is out of range, when calling entityManager.find(1, EntityClass.class)
I'm not sure whether it's a problem with TopLink's way of executing DDLs on db2 or what. Maybe there is a trick to get this working?
SCJP 1.4, SCBCD 1.3, SCBCD 5.0, SCEA J2EE, SCEA 5.0