# One to Many

**URL:** https://discuss.elastic.co/t/one-to-many/111363
**Category:** Logstash
**Created:** [December 12, 2017, 2:44pm UTC](https://discuss.elastic.co/t/one-to-many/111363 "2017-12-12T14:44:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rnicholls](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rnicholls/32/25408_2.png) [@rnicholls](https://discuss.elastic.co/u/rnicholls)
#### Post date: [December 12, 2017, 2:44pm UTC](https://discuss.elastic.co/t/one-to-many/111363/1 "2017-12-12T14:44:35Z")

</div>

Hello,

I am trying to figure out how to do a one to many relationships. I am using JDBC and I have tried to do it via aggregate but can't figure it out.

All I am trying to do is.

{  
id: "1"  
title: "Batman v Superman"  
genre: {  
id: "1"  
"name": "Action"  
}  
}

The movie, and genre(s) are in two tables. I just want to join them together and have the join be an array of objects.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 9, 2018, 2:44pm UTC](https://discuss.elastic.co/t/one-to-many/111363/2 "2018-01-09T14:44:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
