留言板
Query for User with Custom Query
Hi,
I have found a problem implementing a "special" feature in my application. It is difficult to explain so I'll do my best.
I have a custom asset (created with Service Builder). Its name is Project and the users can use a custom portlet to manage and list this entity.
Some of my queries are kind of special, so I have several custom queries implemented (and working fine).
Now. my problem arrives when I have to do something different to query for a project. Now I have to query for users ordered by the number of projects they have created.
I have to execute the next query and retreive the list to my JSP:
Any idea of how to do that?
Thx
I have found a problem implementing a "special" feature in my application. It is difficult to explain so I'll do my best.
I have a custom asset (created with Service Builder). Its name is Project and the users can use a custom portlet to manage and list this entity.
Some of my queries are kind of special, so I have several custom queries implemented (and working fine).
Now. my problem arrives when I have to do something different to query for a project. Now I have to query for users ordered by the number of projects they have created.
I have to execute the next query and retreive the list to my JSP:
select userId, firstName, lastName, jobTitle, (select count(*) from projects_project pp where pp.userId = u.userId and status = ? and groupId = ?) as projectCount
from user_ u
order by projectCount desc
Any idea of how to do that?
Thx
vipin bardia,修改在10 年前。
RE: Query for User with Custom Query
Regular Member 帖子: 162 加入日期: 11-2-28 最近的帖子
Hi Ramon,
Hope this help -http://www.liferay.com/community/forums/-/message_boards/message/7158040
Regards,
Vipin Bardia
Hope this help -http://www.liferay.com/community/forums/-/message_boards/message/7158040
Regards,
Vipin Bardia