Fred wrote:
Okay, now, before I created the FK on OwnerID, while it was still a plain old nullable field, I did create a custom relation to establish the relationship. But it didn't show up in the regenned class, and in trying to figure out why not, I decided maybe the field being nullable was the reason. That's when I posted my first message here, asking how to delete the custom relation (the "embarrassingly obvious" question).
So I deleted the custom relation on both sides, made the changes to the tables, refreshed the catalog, and regenned.
I don't understand why there would be a custom relation when I deleted it. Shouldn't it be an intrinsic relation, based on the foreign key constraint?
Thanks for your help with this. Much appreciated.
The screenshot you posted, GenProProjExp.jpg, shows that the relation UserCDV.OwnerID - User.UserID is still a custom relation.
Nevertheless, the custom relation also has to show up in the code. I'll try to reproduce the steps you took here and see if I can get your situation reproduced.
(edit)
I can't reproduce it. I've removed the FK, refreshed the catalog, relation was gone, then I added a custom relation, generated code, worked fine. Then I added the FK and refreshed, the custom relation stayed (because it was already there, so it isn't overwritten by an FK based relation). I removed the custom relation, refreshed, FK based relation turned up, generated code, worked fine. I tried to use a table setup the same as you had, with a nullable field for OwnerID (which shouldn't and didn't make a difference).
I'd suggest to you to download teh latest version from the upgrades section and to check if that version generates correct code (that's the version I tested it with).