留言板

userPersistence cannot be resolved

naresh kumar,修改在11 年前。

userPersistence cannot be resolved

New Member 帖子: 18 加入日期: 12-11-3 最近的帖子
Hi friends,
I created a hook for BlogsEntryLocalServiceWrapper and i tried to override updateStatus(). When I used
User user = userPersistence.findByPrimaryKey(userId);
it shows
userPersistence cannot be resolved
. can u please help me how to solve this?

Regards,
Naresh
thumbnail
David H Nebinger,修改在11 年前。

RE: userPersistence cannot be resolved

Liferay Legend 帖子: 14914 加入日期: 06-9-2 最近的帖子
You cannot rely on having direct access to the persistence layer.

Use UserPreferenceLocalServiceUtil instead.