juliocamarero/liferay-portal — pull request #138 by achaparro (2011-10-10 09:00:35+00:00)
Title: LPS-21928 - Parent category needs to be cleared from Hibernate Session Cache(first level cache) during categories hierarchy building

We have two options for this problem:

1- This solution, using session.clear()

2- Use evict to remove only parentCategory but for this we need to call findByPrimaryKey, after we have to call evict() for this object, deleting liferay cache and call findByPrimaryKey again in getLastRightCategoryId method.