From 73f2da508790087ebbce3a5331dde0854a1ba63e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 5 Dec 2012 11:57:18 -0600 Subject: [PATCH] allow more customization of db._adapter.types --- VERSION | 2 +- gluon/dal.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index be1f85b0..108a4879 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-05 11:34:39) rc1 +Version 2.3.0 (2012-12-05 11:56:35) rc1 diff --git a/gluon/dal.py b/gluon/dal.py index 9dc1e720..cfc736b4 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -6851,9 +6851,10 @@ class DAL(object): adapter_args=adapter_args or {}, do_connect=do_connect) self._adapter = ADAPTERS[self._dbname](**kwargs) + types = ADAPTERS[self._dbname].types + # copy so multiple DAL() possible + self._adapter.types = copy.copy(types) if bigint_id: - types = ADAPTERS[self._dbname].types - self._adapter.types = copy.copy(types) # copy so multiple DAL() possible if 'big-id' in types and 'reference' in types: self._adapter.types['id'] = types['big-id'] self._adapter.types['reference'] = types['big-reference']