protected function _dataOneToMany($field, $collection) {
        /**
         * Instead of making only one query by line, we assemble all the lines IDs and we make a big query (time saving)
         * First, we make the query, using IN()
         * Then, we loop through the query lines and we add to each line her data from join
         */

        $in = '';
        $inVars = [];
        $currentField = $field->foreign->field();
        $referenceEntity = $field->foreign->referenceEntity();
        $referenceField = $field->foreign->referenceField();
        $fieldFormName = lcfirst($referenceEntity) . '.' . lcfirst($referenceField);

        /** @var $line \Gcs\Framework\Core\Orm\Entity\Entity */
        foreach ($collection as $key => $line) {
            $in .= ' :join' . $key . ',';
            $inVars['join' . $key] = $line->get($currentField);
        }

        $in = trim($in, ',');

        /** @var $datasJoin \Gcs\Framework\Core\Collection\Collection */
        $datasJoin = self::Entity()->$referenceEntity()->find()->where($fieldFormName . ' IN(' . $in . ')')->orderBy($fieldFormName . ' ASC')->vars($inVars)->fetch();

        $data = null;

        /** @var $line \Gcs\Framework\Core\Orm\Entity\Entity */
        foreach ($collection as $line) {
            $count = $line->get($field->name);
            $data = new Collection();

            /** @var $dataJoin \Gcs\Framework\Core\Orm\Entity\Entity */
            foreach ($datasJoin as $key2 => $dataJoin) {
                /**
                 * The lines are ordered by reference Entity ID, so when we find the first line, we have just to
                 * get the following lines thanks to $count
                 */
                if ($count > 0 && $dataJoin->get($referenceField)->get($currentField) == $line->get($currentField)) {
                    $data = new Collection($datasJoin->getRange($key2, $count));
                    $datasJoin->deleteRange($key2, $count);
                    break;
                }
            }

            $line->set($field->name, $data);
        }

        /** @var $line \Gcs\Framework\Core\Orm\Entity\Entity */
        /*foreach($collection as $line){
            $currentEntity = $field->foreign->Entity();
            $currentField  = $field->foreign->field();
            $referenceEntity = $field->foreign->referenceEntity();

            $where = $currentEntity.'.'.$currentField.' = '.$line->get($line->primary());
            $data = self::Entity()->$referenceEntity()->find()->where($where)->fetch();
            $line->set($field->name, $data);
        }*/

        return $collection;
    }