Good morning all.

I have a large-ish database with meaningful, user modifiable PKs - which sucks. 
For legacy reasons, I can't ditch the old PKs entirely in favor of new ones - 
which also sucks. However, I need to write to this database using EOF, so I 
decided to throw this into the wild to see if someone  has dealt with something 
similar, or has some brilliant insight into the problem.

I believe I can solve this with brute force, for example:

1. Create new unique valued PK columns for each table in the DB. Make EOF use 
this for it's PK/globalID. Don't model any relationships, but create cover 
methods to manually fetch objects based on the "old" PKs and FKs, and mutators 
to maintain the fake-ish relationships.

2. Create new unique valued PK columns - AND new FK columns. Model 
relationships in EOF based on these. Create triggers in the DB to update the 
new FK columns when old FKs or PKs are modified, and vice versa.

3. Magic?

If anyone has better ideas , I would *love* to hear it. I shudder at the 
thought of the amount of error-prone manual labour that will be involved in 
implementing either of the "solutions" mentioned above.

Cheers,
- hugi _______________________________________________
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