Hello Pramod,
I really can't review these changes. You have missed updates to SequenceProcessor which I have attached here. Updating EntityMappingsXMLProcessor.java is going to require other classes to change unless you use the attached example and provide a DatabaseTable.addUniqueConstraint(String columnName).
--Gordon
-----Original Message-----
From: Pramod Gopinath [mailto:Pramod.Gopinath_at_Sun.COM]
Sent: Tuesday, March 14, 2006 8:46 PM
To: Tom Ware; Gordon Yorke; persistence_at_glassfish.dev.java.net
Subject: Code changes relevant to Issue 272 : java2db support for
UniqueConstraint
Hi Gordon/Tom
These are the changes for issue 272 : Support in java2db for
UniqueConstraints
Problems with the existing code:
1. As per the spec the user could provide multiple @UniqueConstraint
annotations for an entity. But the original code was taking the fields
that were part of the unique constraint and storing them into a Vector
in DatabaseTable. This leads to problems at ddl generation type as there
is no way to know which fields belong to which unique constraint.
2. Additionally the existing code was taking each of the field names
that are passed in as part of the UniqueConstraint and creating a
DatabaseField before setting it into the vector. This is not required.
We could take the String[] of columns associated to the UniqueConstraint
and set that as is into the DatabaseTable.
I need help with making changes into this file :
src/java/oracle/toplink/essentials/internal/ejb/cmp3/xml/EntityMappingsXMLProcessor.java
Could U take a look at the method processUniqueConstraints() in this file.
Files Added :
src/java/oracle/toplink/essentials/tools/schemaframework/UniqueKeyConstraint.java
Files Modified :
src/java/oracle/toplink/essentials/internal/annotations/EJBAnnotationsProcessor.java
src/java/oracle/toplink/essentials/internal/databaseaccess/DatabasePlatform.java
src/java/oracle/toplink/essentials/internal/helper/DatabaseTable.java
src/java/oracle/toplink/essentials/tools/schemaframework/DefaultTableGenerator.java
src/java/oracle/toplink/essentials/tools/schemaframework/SchemaManager.java
src/java/oracle/toplink/essentials/tools/schemaframework/TableDefinition.java
Thanks
Pramod