mirror of https://github.com/apache/openjpa.git
OPENJPA-395. Use getShort instead of getInt for the KEY_SEQ, DEFFERABILITY, and DELETE_RULE metadata fields.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@582838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
704fc1b513
commit
4fb0c28dc2
|
@ -3644,11 +3644,11 @@ public class DBDictionary
|
||||||
fk.setPrimaryKeySchemaName(fkMeta.getString("PKTABLE_SCHEM"));
|
fk.setPrimaryKeySchemaName(fkMeta.getString("PKTABLE_SCHEM"));
|
||||||
fk.setPrimaryKeyTableName(fkMeta.getString("PKTABLE_NAME"));
|
fk.setPrimaryKeyTableName(fkMeta.getString("PKTABLE_NAME"));
|
||||||
fk.setPrimaryKeyColumnName(fkMeta.getString("PKCOLUMN_NAME"));
|
fk.setPrimaryKeyColumnName(fkMeta.getString("PKCOLUMN_NAME"));
|
||||||
fk.setKeySequence(fkMeta.getInt("KEY_SEQ"));
|
fk.setKeySequence(fkMeta.getShort("KEY_SEQ"));
|
||||||
fk.setDeferred(fkMeta.getInt("DEFERRABILITY")
|
fk.setDeferred(fkMeta.getShort("DEFERRABILITY")
|
||||||
== DatabaseMetaData.importedKeyInitiallyDeferred);
|
== DatabaseMetaData.importedKeyInitiallyDeferred);
|
||||||
|
|
||||||
int del = fkMeta.getInt("DELETE_RULE");
|
int del = fkMeta.getShort("DELETE_RULE");
|
||||||
switch (del) {
|
switch (del) {
|
||||||
case DatabaseMetaData.importedKeySetNull:
|
case DatabaseMetaData.importedKeySetNull:
|
||||||
fk.setDeleteAction(ForeignKey.ACTION_NULL);
|
fk.setDeleteAction(ForeignKey.ACTION_NULL);
|
||||||
|
|
Loading…
Reference in New Issue