--- a/server/sources/native.py Wed Dec 09 17:44:17 2015 +0100
+++ b/server/sources/native.py Wed Dec 09 17:44:18 2015 +0100
@@ -119,12 +119,9 @@
"""return backend type and a boolean flag if NULL values should be allowed
for a given relation definition
"""
- if rdef.object.final:
- ttype = rdef.object
- else:
- ttype = 'Int' # eid type
- coltype = y2sql.type_from_constraints(dbhelper, ttype,
- rdef.constraints, creating=False)
+ if not rdef.object.final:
+ return dbhelper.TYPE_MAPPING['Int']
+ coltype = y2sql.type_from_rdef(dbhelper, rdef, creating=False)
allownull = rdef.cardinality[0] != '1'
return coltype, allownull