On Wed, 2002-03-20 at 02:34, Stefan Karlsson wrote: > >A solution would be to implement a "dump" which outputs the objects > >in > >the same format as the samples.csv file, so that MiddleKit can > >easily > >reload the objects, even if the classids change. This "dump" could > >also > >be useful for making backups, or allowing the administrator to > >"tweak" > >data (or schema) and then reload it (which is useful in the > >design/development phase). > > > >I plan to implement this dump functionality -- but if someone has > >already done this, please email me right away (to save me the > >effort). > > > I have written such a dump routine for my internal project. Not > so general but maybe you can do something with it. I can e-mail > it if you want. > > Note that if you have deleted any objects in the database the > standard Samples.csv format is not so good because the objects > always get consecutive ids from 1. You will loose the object > identities which may ruin object references. > > Therefore I have added an id column like this (notice that > Foo with id 3 is deleted): > > Foo objects > fooId,a > 1,123 > 2,432 > 4,543
Sorry I got your message too late -- I've already implemented this. I did the same thing (added id columns), and modified the SQLGenerator.py to accept this column if it exists. I also took care of "quoting" and "unquoting" to protect strings which may contain special characters (commas, newlines). I'm going to clean up the code a bit, and then submit it as a patch (because I think this functionality belongs in the MK itself). Cheers, Jason _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
