Fórum

Service Builder / How to define queries

thumbnail
Michel Wicky, modificado 13 Anos atrás.

Service Builder / How to define queries

Regular Member Postagens: 130 Data de Entrada: 03/07/10 Postagens Recentes
I'm developping a little application which has to select many data but only perist/merge only one. I would like to know if it is a way to declare entities that are queries (read only) instead of declaring all tables as entities.

Thank You
thumbnail
Mika Koivisto, modificado 13 Anos atrás.

RE: Service Builder / How to define queries

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
ServiceBuilder does not really support views but you could declare an entity without any columns and then make your queries from the service impl.
thumbnail
Michel Wicky, modificado 13 Anos atrás.

RE: Service Builder / How to define queries

Regular Member Postagens: 130 Data de Entrada: 03/07/10 Postagens Recentes
Thank you Mika for answering. Do you know any tutorials or examples to achieve this ?
thumbnail
Mika Koivisto, modificado 13 Anos atrás.

RE: Service Builder / How to define queries

Liferay Legend Postagens: 1519 Data de Entrada: 07/08/06 Postagens Recentes
I'm pretty sure there was a blog post about it by Raymond Auge but I can't find it now.
thumbnail
Michel Wicky, modificado 13 Anos atrás.

RE: Service Builder / How to define queries

Regular Member Postagens: 130 Data de Entrada: 03/07/10 Postagens Recentes
Found some old article about custom-sql but none using service.xml as a base to build read only data services. Didn't found anything in Liferay in Action too. There are some services that are read only but not defined like so at the peristance level.