title: Include one child in query
body: <p>I have a class column:</p>
  
  <pre><code>class Column
     include Mongoid::Document
  
     field :name, type: String
     field :label, type: String
     field :typ, type: String
     field :parameter, type: Hash
  
     belongs to :entity
  end
  </code></pre>
  
  <p>and I have a class Entity:</p>
  
  <pre><code>class Entity
     include Mongoid::Document
  
     field :name, type: String
     field :label, type: String
     field :description, type: String
     field :typ, type: String
  
     has_many :columns
  end
  </code></pre>
  
  <p>In my controller I want to return all all Entities with a certain ids:</p>
  
  <pre><code>result = Entity.where(:id.in =&gt;rels)
  render json: { result: result}
  </code></pre>
  
  <p>But additionally I also want to include the the field <em>parameter</em> from the column with <em>name</em> : 'status' which shall be called _actions. That would be the ideal solution. </p>
  
  <p>Example I have the Entity Record:</p>
  
  <pre><code>{ _id: 1,
    name: 'Test',
    label: 'Test',
    description: 'Test',
    typ: 'Test'
  }
  </code></pre>
  
  <p>And I have a column:</p>
  
  <pre><code>{ _id: 2,
    name: 'status',
    label: 'Testxxx',
    description: 'Testxxx',
    typ: 'Test',
    parameter: { a: 'xxx', b: 'yyy},
    entity_id: 1
  }
  </code></pre>
  
  <p>The result want to have rendered as:</p>
  
  <pre><code>{ _id: 1,
    name: 'Test',
    label: 'Test',
    description: 'Test',
    typ: 'Test',
    _action: { a: 'xxx', b: 'yyy},
  }
  </code></pre>
  
  <p>But I would be happy if my results contains the column 'status' or worst case, even all columns. Any ideas? I've been working hours to find a solution.</p>