I have got two tables:
threads: id, title
posts: id, thread_id, body
I want a document to contain the thread and all the posts that belong to it. Why doesn’t this work:
<document>
<entity name="threads"
query="select id, title from threads">
<field column="title" name="threads.title"/>
<entity name="posts"
query="select id, thread_id, body from posts where thread_id='${threads.id}'">
<field column="id" name="posts.id"/>
<field column="thread_id" name="posts.thread_id"/>
<field column="body" name="posts.body"/>
</entity>
</entity>
</document>
It says that total rows fetch are 228, but it tells that 0 documents were added. Why is that?
When I have seen this issue, it’s normally an indexing error. Unfortunantly DIH doesn’t always easily bubble up error messages to where you can see them!