Yuuup...  Type decorators was a right solution:<div><br><div><a href="http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator" target="_blank">http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/types.html#sqlalchemy.types.TypeDecorator</a></div>


<div><br></div><div>It works like a charm!<div><br></div><div>I have created a simple class that gets a dictionary and &quot;serializes&quot; its values. As I explained in other messages, the underlying database is MySql...</div>


<div><br></div><div>Just in case my code may help someone (or if someone has any suggestions...) here it goes:</div><div><br></div><div><div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">from sqlalchemy import types</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">import logging</font></span></div><div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">log = logging.getLogger(__name__)</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">class SimpleDict(types.TypeDecorator):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">impl = types.String</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">size = -1</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__separatorChar = chr(0x1D)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__boolPrefix = &quot;b_&quot;</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__intPrefix = &quot;i_&quot;</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__floatPrefix = &quot;f_&quot;</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__nullPrefix = &quot;n_&quot;</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__specialPrefixes = set([__boolPrefix, __intPrefix, __floatPrefix, __nullPrefix])</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">__nullValues = set([&quot;null&quot;, &quot;None&quot;])</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">def __init__(self, length = 1024):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">self.size = int(length)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">super(ZepSimpleDict, self).__init__(self.size)</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">def __toString(self, value):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if isinstance(value, bool):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = self.__boolPrefix + str(value)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif isinstance(value, float):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = self.__floatPrefix + str(value)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif isinstance(value, int):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = self.__intPrefix + str(value)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif (value is None) or (value in self.__nullValues):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = self.__nullPrefix + str(None)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = str(value)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">return retval</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">def __fromString(self, value):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">prefix = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">actualValue = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if len(value) &gt; 2:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">prefix = value[0:2]</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if (prefix in self.__specialPrefixes):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">actualValue = value[2:]</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if prefix == self.__boolPrefix:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if actualValue == &quot;True&quot;:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = True</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif actualValue == &quot;False&quot;:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = False</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif prefix == self.__floatPrefix:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">try:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = float(actualValue)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">except ValueError:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif prefix == self.__intPrefix:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">try:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = int(actualValue)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">except ValueError:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">elif prefix == self.__nullPrefix:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if actualValue == str(None):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = value</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">return retval</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div>
<span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">def process_bind_param(self, value, dialect):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">value_tmp = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">flattenedValue = list()</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = None</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if isinstance(value, dict):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">value_tmp = dict()</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">for key, val in value.iteritems():</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">value_tmp[self.__toString(key)] = self.__toString(val)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">value_tmp = None</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if (value_tmp is not None):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">for key, val in value_tmp.iteritems():</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">flattenedValue.append(key)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">flattenedValue.append(val)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = self.__separatorChar.join(flattenedValue)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">else:</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = None</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">return retval</font></span></div>


<div><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">def process_result_value(self, value, dialect):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval = dict()</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">value_tmp = value.split(self.__separatorChar)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if (len(value_tmp) &gt; 0):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">if (len(value_tmp) % 2 != 0):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">log.warn(&quot;process_result_value &gt; Processing an string with odd number of elements. This should not have happened.&quot;)</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                        </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">for i in range(0, len(value_tmp), 2):</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">retval[self.__fromString(value_tmp[i])] = self.__fromString(value_tmp[i+1])</font></span></div>


<div><span style="white-space:pre-wrap"><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">                </font></span></span><span style="font-size:x-small"><font face="&#39;courier new&#39;, monospace">return retval</font></span></div>


</div><div><div><br></div><div><br></div><div><br></div><div>In my previous message, I said:</div><div><span style="font-family:arial, sans-serif;border-collapse:collapse"><i><span style="font-size:x-small">In my brain, I have &quot;dreamed&quot; about something like an special type of sqlalchemy.Column in which you can specify something like &quot;on_save = execute this()&quot; and &quot;on_load = execute that()&quot;... </span></i></span></div>


<div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div></div><div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse">This does exactly that! :) Thank you, Jan for the hint!</span></div>


<div><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><div class="gmail_quote">2010/10/25 Jan-Wijbrand Kolman <span dir="ltr">&lt;<a href="mailto:janwijbrand@gmail.com" target="_blank">janwijbrand@gmail.com</a>&gt;</span><br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 10/23/10 00:36 , Hector Blanco wrote:<br>
&gt; Is there a way to automatically execute an stored procedure (SQL<br>
&gt; preferably, but I could do it on the &quot;Python&quot; side) so when the class is<br>
&gt; saved, that list field will be automatically joined (with whatever<br>
&gt; separator character) and when the class (or that field) is loaded, it<br>
&gt; will be automatically split-ed (so it will come back as a list)?<br>
<br>
</div>I&#39;m not using Grok in combination with a RDBM, but, would a decorator be<br>
usefull in this case? The decorated function could be the facade for the<br>
actual stored value and do the joining in the setter and the spltting in<br>
the getter.<br>
<br>
HTH,<br>
regards, jw<br>
<br>
_______________________________________________<br>
Grok-dev mailing list<br>
<a href="mailto:Grok-dev@zope.org" target="_blank">Grok-dev@zope.org</a><br>
<a href="https://mail.zope.org/mailman/listinfo/grok-dev" target="_blank">https://mail.zope.org/mailman/listinfo/grok-dev</a><br>
</blockquote></div><br></div></div>