I've haven't seen this mentioned lately and, since I just had to use it, I thought I pass it along to the group. Here's a handy command line Java app that's included with WebObjects which makes it simple to transfer data between a database and a plist. It also works across different database vendors: /System/Library/WebObjects/JavaApplications/javaeoutil.woa/javaeoutil help This app (javaeoutil; prior to WO 5.0it was simply called eoutil) has been included with WebObjects for at least 7+ years. Several years ago, I successfully used it, on-site, for a client, to convert a live/production database from Oracle to Sybase by simply exporting the Oracle data and schema and importing it into Sybase. It's a simple process once you understand the command: 1. Run javaeoutil to extract the data on the source database. 2. Point your EOModel's connection dictionary to the target database. 3. Run EOModeler's Generate SQL command to create the tables on the destination database. 4. Run javaeoutil to import the data into the target database. Optional step: Depending how your target database generates primary keys, you may need to drop/recreate primary key support for your database; EOModeler can be used for this step depending on your database. Example command line usage: cd to /System/Library/WebObjects/JavaApplications/javaeoutil.woa Extract entire database into plist: ./javaeoutil dump ~/Projects/MYWOProject/Library/Frameworks/MYWOProjectObjectModel/MyEOModel.eomodeld -source database -dest plist ~/Desktop/Database.plist Import single entity into database: ./javaeoutil dump ~/Projects/MYWOProject/Library/Frameworks/MYWOProjectObjectModel/MyEOModel.eomodeld -entities Customer -dest database -source plist ~/Desktop/Database.plist or ./javaeoutil dump ~/Projects/WebObjectsProjects/MYWOProject/Library/Frameworks/MYWOProjectObjectModel/MyEOModel.eomodeld -entities Customer -dest database -source plist ~/Desktop/Customer.plist Obviously, there are other solutions out there too. - Joe |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
