Foros de discusión

fetching data from nonliferay db table

Heena R, modificado hace 7 años.

fetching data from nonliferay db table

New Member Mensajes: 21 Fecha de incorporación: 8/08/16 Mensajes recientes
Hi ,
i am using liferay 6.2 ga2 and following below link to connect to non liferay database

http://www.liferaysavvy.com/2013/08/liferay-plugin-portlet-connecting-to.html

after following this guidelines and i want to fetch data from this table tablefromanotherdatasource which is specified in blog i m aware that we can use custom queries and dynamic queries to achieve that but i want to use dynamic queries to fetch that from specified table but i m not finding any step by step procedure example to fetch data using dynamic queries.can anybody please help me with these.it would be great help

thanks in advance.
thumbnail
David H Nebinger, modificado hace 7 años.

RE: fetching data from nonliferay db table

Liferay Legend Mensajes: 14919 Fecha de incorporación: 2/09/06 Mensajes recientes
You won't find anything that directly combines the concepts.

Follow the instructions to connect to the external database. That is one concept that you deal with on it's own.

Then you define your custom entities. This is a basic step covered in all Liferay documentation about service builder.

Create your DQs against your custom entities. This too you will find examples in Liferay documentation.

When you pull it all together, you'll have DQ calls against your custom entities which happen to come from an external database.