Fórum

Service Builder

thumbnail
Priyanka Dhingra, modificado 11 Anos atrás.

Service Builder

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Hi
select 
  count(track.id_terminal)
, company.name as myResult 
from  track,detailsForTerminal, client,service,terminal, customer,customerGroup,Location,Item,company_plan,company
Where track.id_client = client.client_id
and 
detailsForTerminal.id_terminal = track.id_terminal
and 
detailsForTerminal.id_group = customerGroup.customerGroup_id
and 
service.id_client = client.client_id
and 
service.id_rm = terminal.terminal_id
and 
track.id_customer = customer.customer_id
and 
customerGroup.id_customer = customer.customer_id
and terminal.serial = Location.rm_serial 
and 
Location.id_Item = Item.Item_id
and 
Item. id_plan =  company_plan.companyplan_id
and company_plan.id_company = company.company_id
and customer.customer_id = 100
group by company.name

How can i go about this kind of query using service builder??

thanks and regards
Priyanka Dhingra
thumbnail
Juan Gonzalez P, modificado 11 Anos atrás.

RE: Service Builder

Liferay Legend Postagens: 3089 Data de Entrada: 28/10/08 Postagens Recentes
thumbnail
Priyanka Dhingra, modificado 11 Anos atrás.

RE: Service Builder

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
thanks for the link...

but I have multiple tables in from clause ...so what should be the finder class and interface to refer???

Better if i could find a solution using some hibernate logic, since I have many queries like that...may be some workaround like inner join or something can help...but I do not have much knowledge on db
thumbnail
Priyanka Dhingra, modificado 11 Anos atrás.

RE: Service Builder

Liferay Master Postagens: 501 Data de Entrada: 20/12/11 Postagens Recentes
Help!! emoticon
thumbnail
Subhash Pavuskar, modificado 11 Anos atrás.

RE: Service Builder

Regular Member Postagens: 234 Data de Entrada: 13/03/12 Postagens Recentes
Hope this 2 links may help you to solve your Custom Query !!

Link1

Link2