Ryan Krauss wrote:
> Maybe an example would make this clearer. What if I want to store a
> collection of objects with the following properties:
> entry1.input='a1'
> entry1.output='j2'
> entry1.datafile=['file1','file2','file3']
> entry1.data1=[1.2,1.47,3.56,....]
> entry1.data2=[-1.5,-19.5,35.5,....]
>
> And what if data1 and data2 are Numeric arrays/matrices (or from
> numarray)? Can SQLObject store a collection of such objects?
You can use PickleCol for this, so long as its okay that the data is
opaque to the database and to queries. Or you could create a
_set_data1() method that inserts the values into another table, and
_get_data1() that retrieves them.
--
Ian Bicking / ia...@co... / http://blog.ianbicking.org
|