• 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
EOF and meaningful, modifiable PKs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOF and meaningful, modifiable PKs


  • Subject: EOF and meaningful, modifiable PKs
  • From: Hugi Thordarson <email@hidden>
  • Date: Tue, 13 Jul 2010 10:36:12 +0000

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

This email sent to email@hidden

  • Follow-Ups:
    • Re: EOF and meaningful, modifiable PKs
      • From: Chuck Hill <email@hidden>
    • Re: EOF and meaningful, modifiable PKs
      • From: Farrukh Ijaz <email@hidden>
  • Prev by Date: Prevent "Connection reset by peer" message to be shown in log file
  • Next by Date: accessing the primarykey???
  • Previous by thread: Antw: Re: Prevent "Connection reset by peer" message to be shown in log file
  • Next by thread: Re: EOF and meaningful, modifiable PKs
  • Index(es):
    • Date
    • Thread