fixed issue 649
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.4 (2012-02-07 11:08:32) stable
|
Version 1.99.4 (2012-02-07 11:28:00) stable
|
||||||
|
|||||||
+6
-1
@@ -6130,6 +6130,7 @@ def index():
|
|||||||
t._format = format
|
t._format = format
|
||||||
t._singular = singular
|
t._singular = singular
|
||||||
t._plural = plural
|
t._plural = plural
|
||||||
|
t._actual = True
|
||||||
return t
|
return t
|
||||||
|
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
@@ -6346,6 +6347,7 @@ class Table(dict):
|
|||||||
|
|
||||||
:raises SyntaxError: when a supplied field is of incorrect type.
|
:raises SyntaxError: when a supplied field is of incorrect type.
|
||||||
"""
|
"""
|
||||||
|
self._actual = False # set to True by define_table()
|
||||||
self._tablename = tablename
|
self._tablename = tablename
|
||||||
self._sequence_name = args.get('sequence_name',None) or \
|
self._sequence_name = args.get('sequence_name',None) or \
|
||||||
db and db._adapter.sequence_name(tablename)
|
db and db._adapter.sequence_name(tablename)
|
||||||
@@ -6380,7 +6382,10 @@ class Table(dict):
|
|||||||
table = field
|
table = field
|
||||||
for field in table:
|
for field in table:
|
||||||
if not field.name in fieldnames and not field.type=='id':
|
if not field.name in fieldnames and not field.type=='id':
|
||||||
newfields.append(copy.copy(field))
|
field = copy.copy(field)
|
||||||
|
if field.type == 'reference '+table._tablename: # correct self references
|
||||||
|
field.type = 'reference '+self._tablename
|
||||||
|
newfields.append(field)
|
||||||
fieldnames.add(field.name)
|
fieldnames.add(field.name)
|
||||||
else:
|
else:
|
||||||
# let's ignore new fields with duplicated names!!!
|
# let's ignore new fields with duplicated names!!!
|
||||||
|
|||||||
Reference in New Issue
Block a user