Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
index af703cc3a2..2b05c4ba3a 100644
--- a/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
+++ b/plugins/org.eclipse.net4j.db.oracle/src/org/eclipse/net4j/db/oracle/OracleAdapter.java
@@ -155,13 +155,24 @@ public class OracleAdapter extends DBAdapter
return "DATE";
case CHAR:
case VARCHAR:
- return "VARCHAR2(4000)";
+ return "VARCHAR2(" + field.getPrecision() + ")";
default:
return super.getTypeName(field);
}
}
@Override
+ public int getFieldLength(DBType type)
+ {
+ if (type == DBType.VARCHAR)
+ {
+ return 4000; // Oracle only supports 4000 for VARCHAR
+ }
+
+ return super.getFieldLength(type);
+ }
+
+ @Override
public DBType adaptType(DBType type)
{
if (type == DBType.BOOLEAN)

Back to the top