[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-dev] adding support for creation of column indices
|
Hi Dies,
I'll cover some testing basics in this email and send yet another email to
try to help you get indices working.
There are two test suites that are going to be of interest to you and as I
mentioned, since there is no specific database conformance test suite at the
moment, we will have to do some work to identify which tests need to run
successfully. I hope that I can help you with that.
The first suite I recommend getting running is our JPA test suite. I choose
this one first because it has fairly good coverage of the elements you will want
to get the CTS working and it is easier to understand.
The JPA test suite is completely JUnit based. Here is a getting started page
for running the tests:
http://wiki.eclipse.org/EclipseLink/Development/Testing/JPA
I recommend choosing to run the tests either in Ant or in Eclipse. There are
instructions on the page above indicating how to do either. (If you are using
another IDE that has JUnit integration, it should be fairly easy to set that up
as well)
The goal with the JPA tests will be to make the suite run without errors.
There are two things we can do to enable that.
1. Make the tests pass
2. Determine that the tests are testing features that are not supported by
our new database platform, make the tests log warnings, and document the limitation.
I suggest, you try to get the tests running first - if you want to see a
successful run, they should work successfully on a default MySQL installation.
The only thing you have to do is ensure it is running in INNODB mode.
Let me know what issues you run into as you get started and I will do my best
to help out.
The second set of tests you will be interested in is our foundation tests.
These tests are built on a legacy framework (though they are runnable in JUnit)
I suggest we worry about those tests after we have dealt with the JPA tests
since we will have to do a little more work to determine which of those tests
should pass. Let me know when you get to that point, and we can discuss. FYI
here is the link to the setup information:
http://wiki.eclipse.org/EclipseLink/Development/Testing/foundation
Let me know what problems you run into,
-Tom
Dies Koper wrote:
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
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev