Hello everyone.<br><br>First of all, thank you for reading this (no matter whether you can/want to help me or not) :-)<br><br>Second, the question:<br><br>I am using meGrok/sqlalchemy to have my classes stored over a RDBMS (MySql) database. <br>
<br>I have a Python class in which one of the fields is a list of strings. I don't really find worthy to create a table to relate the class with the fields (is just a list that can take certain names of days of the week) so I was planning to store them in MySql as an string where the values would be separated with a comma (or semicolon). <br>
<br>On the other hand, is very useful to have that field as a list (in Python classes) so here's my question:<br><br>Is there a way to automatically execute an stored procedure (SQL preferably, but I could do it on the "Python" side) so when the class is saved, that list field will be automatically joined (with whatever separator character) and when the class (or that field) is loaded, it will be automatically split-ed (so it will come back as a list)?<br>
<br>In my brain, I have "dreamed" about something like an special type of sqlalchemy.Column in which you can specify something like "on_save = execute this()" and "on_load = execute that()"... :-)<br>
<br>And, for the record, I am a newbie with this Grok over MySql thing so it may not make any sense what I just asked but... I had to try.<br><br>Thank you in advance.<br>