On Dec 9, 2006, at 9:50 PM, Al Byers wrote:

David,

I am getting back into the content management code and I see in
ContentWorker that you changed the direction of sub-content so that
"contentId" is the "parent" and "contentIdTo" is the child.

           // NOTE DEJ20060610: Changed "From" to "To" because it
makes the most sense for sub-content renderings using a root-contentId
and mapKey to determine the sub-contentId to have the ContentAssoc go
from the root to the sub, ie try to determine the contentIdTo from the
contentId and mapKey
           // This shouldn't be changed from "To" to "From", but if
desired could be parameterized to make this selectable in higher up
calling methods

I like that reasoning; I never could formulate a justification for
doing it one way or the other. Unfortunately, some of my content
management code was written in the reverse. Primarily, that would be
the "persistContentAndAssoc" service. It takes in "contentId" or
returns it if it is a create. The service will take in the value of
the parent Content to which the created content will link, so I used
"contentIdTo" (the reverse of what your logic would be) just because I
was using "contentId" for the newly generated Content.

There are all that many places to change and I am glad to have a
"rule" so I don't mind changing it. It will probably break the code of
anyone using "persistContentAndAssoc" and that is part of the reason
for sending this to the list. But I doubt if many people are using it;
it should probably be refactored soon. So I will go and tweak it (add
a new parameter - contentIdFrom - INOUT) to pass in and out a new
parameter for the parent Content ID - unless I hear differently.

As I think about this more I like the idea of having a single convention and not introduce or support this extra flexibility. My guess is it will just be confusing and lead to user and/or programmer errors over time.

So, the basic idea with associated content looked up by map-key you have a contentId and a map-key and from those two, and using the current date/time, you would look up a contentIdTo.

If we just stick to this I don't think we'll need the contentIdFrom thingy, but I may not be getting all of what you were trying to accomplish with that.

And can you copy me directly - I am still having trouble seeing my
posts to the list. Also, do I still have commit privileges? There will
be a lot of little stuff to do.

Do you have a spam filter on? You might want to check and see if the mailing list address was added to a blacklist, or if it is a local spam filter in a client just find the messages and manually set them as not junk.

Anyway, no problem, you're copied on this one at least.

-David

Reply via email to