掲示板
Indexing Implementation in Join Table
11年前 に Edson Ma によって更新されました。
Indexing Implementation in Join Table
New Member 投稿: 6 参加年月日: 11/07/28 最新の投稿
People,
How ar you? I want to ask if there's possibility to Index (using liferay lucene) a join table in Liferay.
My entity is showed ahead (got from my servive.xml):
<entity name="SistemaProducao_Topico_Conteudo" cache-enabled="false" remote-service="false" local-service="true">
<column name="relationId" type="long" primary="true" />
<column name="companyId" type="long" />
<column name="groupId" type="long" />
<column name="sistemaProducaoId" type="long" primary="true"/>
<column name="topicoId" type="long" primary="true" />
<column name="ordem" type="long" />
<column name="content_html" type="String" />
......
</entity>
I implemented the Indexing class :
public class SPTopicoConteudoIndexer extends BaseIndexer { ... }
And put all configurations in portlet.xml and liferay-portlet.xml to make that model looks like a Portlet to be indexed.
After that, when I call the indexing methods... it shows Cast Exceptions.
com.liferay.portal.kernel.search.SearchException: java.lang.ClassCastException: br.com.seatecnologia.embrapa.service.persistence.SistemaProducao_Topico_ConteudoPK cannot be cast to java.lang.Long ........
Are there any way to do that?
Thanks in Advance
Cheers
How ar you? I want to ask if there's possibility to Index (using liferay lucene) a join table in Liferay.
My entity is showed ahead (got from my servive.xml):
<entity name="SistemaProducao_Topico_Conteudo" cache-enabled="false" remote-service="false" local-service="true">
<column name="relationId" type="long" primary="true" />
<column name="companyId" type="long" />
<column name="groupId" type="long" />
<column name="sistemaProducaoId" type="long" primary="true"/>
<column name="topicoId" type="long" primary="true" />
<column name="ordem" type="long" />
<column name="content_html" type="String" />
......
</entity>
I implemented the Indexing class :
public class SPTopicoConteudoIndexer extends BaseIndexer { ... }
And put all configurations in portlet.xml and liferay-portlet.xml to make that model looks like a Portlet to be indexed.
After that, when I call the indexing methods... it shows Cast Exceptions.
com.liferay.portal.kernel.search.SearchException: java.lang.ClassCastException: br.com.seatecnologia.embrapa.service.persistence.SistemaProducao_Topico_ConteudoPK cannot be cast to java.lang.Long ........
Are there any way to do that?
Thanks in Advance
Cheers