• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebObjects & javaeoutil (database <---> ascii)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebObjects & javaeoutil (database <---> ascii)


  • Subject: WebObjects & javaeoutil (database <---> ascii)
  • From: Joseph Leo Moreno <email@hidden>
  • Date: Sat, 4 Feb 2006 15:25:29 -0800

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: command line EOF + WOContext
  • Next by Date: Re: WOBuilder + Webkit Any Chance?
  • Previous by thread: Re: command line EOF + WOContext
  • Next by thread: Long delay after Application.java
  • Index(es):
    • Date
    • Thread