留言板

Query - DB call from Hook

thumbnail
Subhasis Roy,修改在9 年前。

Query - DB call from Hook

Expert 帖子: 275 加入日期: 12-1-20 最近的帖子
Hi,

Can we make any kind of DB call like JPA call, from liferay hook.

Is it possible, if yes, then can anyone please help me by giving some idea or reference.

thanks in advance ,

subhasis
thumbnail
David H Nebinger,修改在9 年前。

RE: Query - DB call from Hook

Liferay Legend 帖子: 14919 加入日期: 06-9-2 最近的帖子
Hooks run within Liferay's ROOT context. Usually it's easier to wrap db access in SB so you can just use the static XxxLocalServiceUtil class to get to it.
thumbnail
Hamidul Islam,修改在9 年前。

RE: Query - DB call from Hook

Regular Member 帖子: 111 加入日期: 08-5-22 最近的帖子
Its possible to access service util classes inside a hook. That means that we can make a DB call from a hook too.

Thanks & Regards
Hamidul Islam
Author
www.proliferay.com
thumbnail
Subhasis Roy,修改在9 年前。

RE: Query - DB call from Hook

Expert 帖子: 275 加入日期: 12-1-20 最近的帖子
can you just give me some reference or sample to look at