Elias Torres wrote:
Everyone,

I'm changing my code that updated the aggregated tags table from using a
task to using code during the life of the request i.e. as we save each
entry.

My question is as follows:

In WeblogEntryData we have addTag() and removeTag() meaning I have two
options:

- I can call WeblogManager.updateTagStat(Tag) on each addTag/removeTag()
- I can perform the tag stats updates inside WeblogManager.save(Entry)

I don't like the first as much but the second one requires me I keep
track of added/removed tags so I can access that information at save
time. ie. entry.getAddedTags(), entry.getRemovedTags().

I would just go for the first option. It's nice if we don't have to refer to managers from the pojos, but to not do that would make things harder on ourselves, so just do it. I am pretty sure we are already doing that anyways.

-- Allen



What do you think?

-Elias

Reply via email to