Open Bugs | New Bug anonymous
Login/Register

Equi4 SoftwareEdit Bug

Title: return idx wrong appending to ordered tables Status: open
Product: Metakit Severity: -
Version: 2.4.9.2 Type: bug
Assign to:
Platform:
Windows
Message:

File:
Description:

Messages

2003/06/27
import metakit
db = metakit.storage()
table = db.getas("test[foo]").ordered()
idx = table.append({"foo":"B"})
assert table[idx].foo == "B"
idx = table.append({"foo":"A"})
# this fails...
assert table[idx].foo == "A"
Basically for ordered tables, the idx returned from an append is not
correct. I assume that this is because the table is re-ordered after
the idx is generated for the return value. 

Bug Tracker © 2002 McMillan Enterprises, Inc.