Hi Tom, all,
As I mentioned in my previous e-mail, I'm trying to run the
foundation/eclipselink.core.test JUnit tests on the Symfoware platform.
Most of them currently fail.
Some are issues with restrictions in Symfoware DB (like you cannot use a
reserved keyword as column name (e.g. "LANGUAGE")), a few others I need
to look at in more detail.
But most are failing because Symfoware DB needs you to create an index
for tables with a unique constraint. That means that for any
auto-generated table with a PRIMARY KEY, I currently get an error when
performing a CRUD on the table.
When we created the Symfoware platform class I didn't see this as a
major restriction, I assumed in production systems people would be
creating their own DDL scripts with tuning parameters and indices etc.).
But as the unit tests would be a great base for regression testing for
the Symfoware platform, I'm trying to think of a way to get it working
anyway.
I'd like to explore the possibility of having EclipseLink create the
required indices when creating tables.
So for each create table statement such as the following, I need a
create index statement such as the one below:
CREATE TABLE EJB.CUSTOMER (
ID VARCHAR(128) NOT NULL ,
NAME VARCHAR(128) NOT NULL ,
AGE VARCHAR(128) ,
PRIMARY KEY (ID,NAME)
);
CREATE INDEX EJB.CUSTOMER.IDX1 KEY(ID,NAME);
Is there a particular suitable place in the code where to do this, where
I can obtain a list of tables that are to be created (or just after the
generation of each table DDL) and retrieve which columns have
unique/primary constraints, so I can hook in a platform specific
callback method to insert the index creation DDL for Symfoware so that
the existing code automatically sends it to the DB and/or file?
Or is there already such a functionality in EclipseLink that I just need
to enable?
Thanks!
Dies Koper