Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Priyanka Dhingra
Service Builder
13 de Novembro de 2012 22:33
Resposta

Priyanka Dhingra

Ranking: Liferay Master

Mensagens: 501

Data de entrada: 19 de Dezembro de 2011

Mensagens recentes

Hi
 1select
 2  count(track.id_terminal)
 3, company.name as myResult
 4from  track,detailsForTerminal, client,service,terminal, customer,customerGroup,Location,Item,company_plan,company
 5Where track.id_client = client.client_id
 6and
 7detailsForTerminal.id_terminal = track.id_terminal
 8and
 9detailsForTerminal.id_group = customerGroup.customerGroup_id
10and
11service.id_client = client.client_id
12and
13service.id_rm = terminal.terminal_id
14and
15track.id_customer = customer.customer_id
16and
17customerGroup.id_customer = customer.customer_id
18and terminal.serial = Location.rm_serial
19and
20Location.id_Item = Item.Item_id
21and
22Item. id_plan =  company_plan.companyplan_id
23and company_plan.id_company = company.company_id
24and customer.customer_id = 100
25group by company.name

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

thanks and regards
Priyanka Dhingra
Juan Gonzalez
RE: Service Builder
13 de Novembro de 2012 23:47
Resposta

Juan Gonzalez

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 2947

Data de entrada: 28 de Outubro de 2008

Mensagens recentes

Did you try using custom sql? See link below:

http://www.liferay.com/community/wiki/-/wiki/Main/Custom+queries+in+Liferay
Subhash Pavuskar
RE: Service Builder
14 de Novembro de 2012 01:13
Resposta

Subhash Pavuskar

Ranking: Regular Member

Mensagens: 234

Data de entrada: 12 de Março de 2012

Mensagens recentes

Hope this 2 links may help you to solve your Custom Query !!

Link1

Link2
Priyanka Dhingra
RE: Service Builder
14 de Novembro de 2012 21:50
Resposta

Priyanka Dhingra

Ranking: Liferay Master

Mensagens: 501

Data de entrada: 19 de Dezembro de 2011

Mensagens 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
Priyanka Dhingra
RE: Service Builder
16 de Novembro de 2012 07:06
Resposta

Priyanka Dhingra

Ranking: Liferay Master

Mensagens: 501

Data de entrada: 19 de Dezembro de 2011

Mensagens recentes

Help!! emoticon