Try using the cacheKey/cacheLookup parameters instead: <entity name="en1" pk="id" transformer="DateFormatTransformer" query="SELECT id, product FROM table WHERE product = 'abc'" > <entity name="en2" cacheKey="id" cacheLookup="en1.id" transformer="DateFormatTransformer" cacheImpl="SortedMapBackedCache" query="SELECT id, code FROM table2" /> </entity>
James Dyer Ingram Content Group (615) 213-4311 -----Original Message----- From: stockii [mailto:stock.jo...@googlemail.com] Sent: Thursday, October 02, 2014 9:19 AM To: solr-user@lucene.apache.org Subject: DIH - cacheImpl="SortedMapBackedCache" - empty rows from sub entity Hello i am fighting with cacheImpl="SortedMapBackedCache". I want to refactor my ugly entities and so i try out sub-entities with caching. My Problem is that my cached subquery do not return any values from the select. but why? thats my entity <entity name="en1" pk="id" transformer="DateFormatTransformer" query="SELECT id, product FROM table WHERE product = 'abc'"> <entity name="en2" pk="id" transformer="DateFormatTransformer" cacheImpl="SortedMapBackedCache" query=" SELECT id, code FROM table2" where="id = '${en1.id}'"/> </entity> this is very fast an clear and nice... but it does not work. all from table2 is not coming to my index =( BUT if i remove the line with "cacheImpl="SortedMapBackedCache" all data is present, but every row is selecte each by each. i thought that this construct, hopefully replace my ugly big join-query in a single entity!? -- View this message in context: http://lucene.472066.n3.nabble.com/DIH-cacheImpl-SortedMapBackedCache-empty-rows-from-sub-entity-tp4162316.html Sent from the Solr - User mailing list archive at Nabble.com.