lib/active_groonga/result_set.rb in activegroonga-1.0.7 vs lib/active_groonga/result_set.rb in activegroonga-2.1.1
- old
+ new
@@ -168,10 +168,14 @@
private
def instantiate(record)
resolved_record = record
@n_key_nested.times do
return nil if resolved_record.nil?
- resolved_record = resolved_record.key
+ if resolved_record.table.is_a?(Groonga::Array)
+ resolved_record = resolved_record.value
+ else
+ resolved_record = resolved_record.key
+ end
end
return nil if resolved_record.nil?
while resolved_record.key.is_a?(Groonga::Record)
resolved_record = resolved_record.key
end