On 4 Apr 2006, at 19:13, David LeBer wrote:

On 4-Apr-06, at 1:58 PM, Jeffrey Pearson wrote:

Thanks to all (David and Paul) for the resource suggestions. I ordered the books from Amazon...just a fyi: it was under $20 for both of them!!!!

Also, I bought and have the videos. I have watched most of the first one. Quick question. This app I am creating uses existing data in an existing database. I was using straight java and jdbc to connect and try to read from those table. After viewing the video, it looks like I am going to be much happier if I copy off the tables, use EOModeler to actually create the tables in the db and then import the data. It looks like some invisible plumbing is set up by using EOModeler to generate the database tables.

I don't think you will need to do this.

You really don't need to do this.

For most database structures, just do what David suggests and let EOModeler give you your model. The only thing it adds, and this is dependent on the driver, is the EO_PK_TABLE.

Now, there is something to be aware of, and this isn't explained too well in the docs. EOF likes databases to follow it's own, mostly undocumented, rules of good behaviour. There are ways around all of these, but it helps to know the rules to start with.

Every table should have a primary key, and it will only automatically manage keys if they are types it likes - numbers of any sort, basically (plus some special cases). If you make a string field your primary key, well, you can, but it's up to you to manage it.

When you create relationships, it only likes one-to-one relationships where the foreign key is the primary key of the related table (which is dumb, but it's an EOF rule).

I think those are the main expectations EOF has that don't conform to common database design principles. Oh, and it works better (for automatic creation of names, nothing major) if your table names are singular, and not plural (so Person, not Persons).

Paul
_______________________________________________
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]

Reply via email to