Fórum

Issue getting values from DB2.

Anil Kumar, modificado 11 Anos atrás.

Issue getting values from DB2.

New Member Postagens: 14 Data de Entrada: 24/06/12 Postagens Recentes
Hi All,

Using Service Builder to get the values from the labelName[column name] & table name is Search. I am accessing DB2 remotely.

When service builder is generated, its create a table as WBNC_Search. [WBNC is namespace]

service.xml

?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.srch.portlet">
<author>Raj</author>
<namespace>WBNC</namespace>

<entity name="Search" local-service="true" remote-service="true">

<!-- PK fields -->

<column name="sid" type="int" primary="true" />

<!-- Group instance -->

<column name="labelName" type="String" />
<column name="NSORTSEQ" type="float" />

</entity>

</service-builder>


As service builder is creating table with WBNC_Search, I wanted to change to WBNC.Search so that i can call from DB2 database.

Tried changing in portlet-hbm.xml file. Didnt work.

Appreicate your help in resolving this issue.

Thanks & Regards
Anil
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Issue getting values from DB2.

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
SB does not support catalog/schema in entities.

You need to define a separate connection to DB2 that uses the "WBNC" as the default for tables.
thumbnail
Vilmos Papp, modificado 11 Anos atrás.

RE: Issue getting values from DB2.

Liferay Master Postagens: 529 Data de Entrada: 21/10/10 Postagens Recentes
Hi Anil,

Namespaces used to separate custom tables from core portal tables. I guess you could access your table remotely but keep in mind, that if you have WBNC scheme defined for the database of Liferay and you have WBNC as namespace for ServiceBuilder than you could use this form in your query: WBNC.WBNC_Search.

Regards,
Vilmos