Re: cascading create

2011-02-02 Thread Derek
Phlip There are a number of posts discussing this issue - one of them may give you some pointers: http://stackoverflow.com/questions/1136106/efficent-way-to-insert-thousands-of-records-into-a-table-sqlite-python-django http://stackoverflow.com/questions/2655670/how-do-i-perform-a-batch-insert-in-

Re: cascading create

2011-02-01 Thread Phlip
Bump? String together the SQL myself? On Jan 31, 3:40 pm, Phlip wrote: > Djangoists: > > Given a model Tree with many Leaves, I want to write this: > >   t = Tree(data=42) >   t.leaves.add(leafy_data=43) >   t.leaves.add(leafy_data=44) >   t.save() > > I want the save() to create the Tree, then c

cascading create

2011-01-31 Thread Phlip
Djangoists: Given a model Tree with many Leaves, I want to write this: t = Tree(data=42) t.leaves.add(leafy_data=43) t.leaves.add(leafy_data=44) t.save() I want the save() to create the Tree, then create the leaves. Other notations would do fine. Batching like this might permit the ORM