I'm developing a social app, which will provide users to create walls for messages (like on FB) and invite their friends. I have a table in my DB that contains the walls and their version (in TimeStamp), meaning - their last update time.
When someone updates a wall, the version will be updated and I want the user to receive this version. I'm using NHibernate and defined my version row to be type of Version, but I couldn't find a way to update a row AND receiving the new version in one atomic action, to prevent concurrency problems.
Is there a way to do this? Is there a better way to solve this problem?