Compound primary key is being generated - contradicts documentation?
Tony Copping <[email protected]> Mon, 20 Dec 2004 22:30:41 -0700
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
Hello EOF list: I have an issue where EOF is trying to generate part of a primary key=20= for me when I don't want it to do so. According to the documentation,=20 "...you cannot use a compound primary key and Enterprise Object=92s=20 automatic primary-key generation. You have to provide a primary key=20 another way." This would be fine with me, because in this case I manage=20= my own keys. The compound keys worked as expected when they were both strings. I=20= supplied a string identifier for the "classification" and a unique=20 identification id within that classification, and WebObjects didn't=20 bother trying to generate a key for me. Now I changed the model to=20 directly associate the objects within a classification to an object=20 with other information for the classification. I still set my own=20 unique identifier (a string), but now the EOF decides to assign a=20 unique id of its own (overwriting my setting). Does anyone know why it=20= does this, or if there is a way to make it stop? It appears that EOF is assuming that I don't know what I am doing. I=20= hope I can convince this list otherwise. I am using the compound=20 primary key to track data outside of my model. half of the key is to=20 track where the data came from - this is related into my data model.=20 The other half of the key is a unique identifier from that external=20 source. This seems like a classic example where the use of compound=20 keys makes sense, and it makes no sense for keys to be generated in=20 this case. Thanks in advance for any help. T.