encoding entity info in primary keys
encoding entity info in primary keys
- Subject: encoding entity info in primary keys
- From: "Robert A. Decker" <email@hidden>
- Date: Wed, 5 Nov 2003 15:26:09 -0800 (PST)
So, is anyone actually encoding entity info in their primary keys? I've
done it in one of my projects and found that it allowed me to create much
better designed models. Specifically, the ability to have a relationship
to a superclass type rather that to each of its subclass types saved me on
a number of occasions (for example, being able to tie your relationship
to a Person type, but in your persons array having an array of both
Customer and StaffMember types).
The reason I ask is that the demo project seems to have languished. I
ended up trashing a bunch of the demo code since I couldn't get it to
work properly, plus I didn't like where they kept the identifier for the
entity types (in the UserInfo dict in the model). However, I _know_ the
system I implemented won't be as efficient since I'm not grabbing bits
directly from the Numbers - instead I'm converting to Strings, then taking
the first three letters and then converting that to a Number, which gives
me my entity identifier (I know, lame lame lame).
I'm thinking of taking a very big project and adding encoding of entity
info to primary keys. However, it has to be very efficient. Talking to
other developers over the years it seems that no one takes advantage of
this capability, and so I'm wondering if there are specific reasons, or if
it's just because, well, the demo sucked. :-)
thanks,
Robert A. Decker
http://www.robdecker.com/
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.