I am doing some PloneFormGen work. Currently PloneFormGen stores entered form entries internally as tuples without associated column information. If new columns (form fields) are added then the existing data becomes invalid.
This could be easily avoided storing data in ordered dictionaries, which retain both entered column order and column ids.
Does ZODB have data type equivalent of ordered dictionary? If possible even with matching API (Python dict-like item manipulation and access)?
you'll probably have to build your own class as I am not aware of any current implementations.
You can find implementations of ZODB persisting ordered dicts based on PersistentDict and OOBtree here:
https://github.com/bluedynamics/node.ext.zodb/blob/master/src/node/ext/zodb/utils.py
This implementations are based on odict package:
http://pypi.python.org/pypi/odict
Since it's not possible to persist dict type inheriting objects to ZODB (because persistent.Persistent and dict has incompatible low level implementations) odict provides a way for easily hooking different base classes (using _dict_impl function internally all over the place). That is the reason why odict package is still used in favour of even python 2.7's ordered dict implementation or other 3rd party ordereddict implementations.