留言板
Query for User with Custom Query
Hi,
I have found a problem implementing a "special" functionality 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" functionality 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
This forum is for Alloy UI discussions. You'll be better served by asking your question in Liferay Portal > 3. Development