lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keiichi MORITA <kmor...@sios.com>
Subject Re: DIH do not work. Child-entity cannot refer parent's id.
Date Mon, 23 Jan 2017 13:47:51 GMT
Resolved. My problem occurred because of the case-sensitive. 
I've read the source code of Solr-6.3 and found a code referencing metadata
of databases, 
so I finally noticed that Oracle Database returns *UPPERCASE* letters from
metadata.

As a correct setting, in the where clause of the query called by the child
entity,
it have to be written as follows.

## data-config.xml

  <document>
    <entity name="books" query="select book_id, title from books where
deleted = 0" >
-     <entity name="contents" query="select book_id, content_id, content
from contents where book_id = ${books.book_id} and deleted = 0" >
+    <entity name="contents" query="select book_id, content_id, content from
contents where book_id = ${books.BOOK_ID} and deleted = 0" >
      </entity>
    </entity>
  </document>

Only changing '${books.book_id}' to '${books_BOOK_ID}'.

In my first Solr challenge, it took a while to solve it. 
Because I overlooked the small but important reasons.
I hope this will be helpful for someone else.


Kind,
Keiichi




--
View this message in context: http://lucene.472066.n3.nabble.com/DIH-do-not-work-Child-entity-cannot-refer-parent-s-id-tp4315023p4315444.html
Sent from the Solr - User mailing list archive at Nabble.com.

Mime
View raw message