openjpa
openjpa copied to clipboard
Fix primary keys and foreign keys not being reversed on Oracle
Primary keys and foreign keys not being reversed when targeting a subset of the schemas on Oracle.
Using the HR demo database:
var options = new Options();
options.put("properties", "<location of persistence xml>");
var configuration = new JDBCConfigurationImpl();
Configurations.populateConfiguration(configuration, options);
var generator = new SchemaGenerator(configuration);
generator.generateSchemas(new DBIdentifier[]{
DBIdentifier.newTable("HR.REGIONS"),
DBIdentifier.newTable("HR.COUNTRIES"),
DBIdentifier.newTable("HR.LOCATIONS"),
DBIdentifier.newTable("HR.LOCATIONS"),
DBIdentifier.newTable("HR.DEPARTMENTS"),
DBIdentifier.newTable("HR.JOBS"),
DBIdentifier.newTable("HR.EMPLOYEES"),
DBIdentifier.newTable("HR.JOB_HISTORY"),
});
@drungrin sorry for late reply: the proposed changes look good to me. Meanwhile, could you please open an issue on JIRA?
@struberg can you take a look?
I Opened an issue on JIRA.
https://issues.apache.org/jira/projects/OPENJPA/issues/OPENJPA-169
@drungrin I guess you mean OPENJPA-2794, correct?
Yes, n OPENJPA-2794 is the one I created, sorry for the mistake.