Foros de discusión

Service Builder

thumbnail
Priyanka Dhingra, modificado hace 11 años.

Service Builder

Liferay Master Mensajes: 501 Fecha de incorporación: 20/12/11 Mensajes recientes
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 hace 11 años.

RE: Service Builder

Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientes
thumbnail
Priyanka Dhingra, modificado hace 11 años.

RE: Service Builder

Liferay Master Mensajes: 501 Fecha de incorporación: 20/12/11 Mensajes recientes
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 hace 11 años.

RE: Service Builder

Liferay Master Mensajes: 501 Fecha de incorporación: 20/12/11 Mensajes recientes
Help!! emoticon
thumbnail
Subhash Pavuskar, modificado hace 11 años.

RE: Service Builder

Regular Member Mensajes: 234 Fecha de incorporación: 13/03/12 Mensajes recientes
Hope this 2 links may help you to solve your Custom Query !!

Link1

Link2