Reputation: 27886
I'm trying to store revision comments using Enver's RevisionEntity so that it's in the same table as the revision ID and timestamp and is stored only once even if multiple entities are changed.
My current approach is
I'm not that happy with this approach though. It seems like it will be prone to race conditions and other goofy behavior. Is there any way I can make this more solid? Maybe by accessing the RevisionEntity directly in the controller action?
Upvotes: 1
Views: 1907
Reputation: 7309
I'm not sure if I really understand your problem, but if you only want to store some information during the request-handling, you can use
Http.Request.current().args
. As the description in the API docs says, it's:
Free space to store your request specific data
Your controller action will just need to copy the comments from params
(or wherever else they're coming from) and store them in the args
map, and then the RevisionListener can retrieve them from there.
Upvotes: 2