@@ 461-495 (lines=35) @@ | ||
458 | * |
|
459 | * @return array |
|
460 | */ |
|
461 | private function convertSqlResultSetMapping(Annotation\SqlResultSetMapping $resultSetMapping) |
|
462 | { |
|
463 | $entities = []; |
|
464 | ||
465 | foreach ($resultSetMapping->entities as $entityResultAnnot) { |
|
466 | $entityResult = [ |
|
467 | 'fields' => [], |
|
468 | 'entityClass' => $entityResultAnnot->entityClass, |
|
469 | 'discriminatorColumn' => $entityResultAnnot->discriminatorColumn, |
|
470 | ]; |
|
471 | ||
472 | foreach ($entityResultAnnot->fields as $fieldResultAnnot) { |
|
473 | $entityResult['fields'][] = [ |
|
474 | 'name' => $fieldResultAnnot->name, |
|
475 | 'column' => $fieldResultAnnot->column |
|
476 | ]; |
|
477 | } |
|
478 | ||
479 | $entities[] = $entityResult; |
|
480 | } |
|
481 | ||
482 | $columns = []; |
|
483 | ||
484 | foreach ($resultSetMapping->columns as $columnResultAnnot) { |
|
485 | $columns[] = [ |
|
486 | 'name' => $columnResultAnnot->name, |
|
487 | ]; |
|
488 | } |
|
489 | ||
490 | return [ |
|
491 | 'name' => $resultSetMapping->name, |
|
492 | 'entities' => $entities, |
|
493 | 'columns' => $columns |
|
494 | ]; |
|
495 | } |
|
496 | ||
497 | /** |
|
498 | * Parse the given Cache as CacheMetadata |
@@ 695-729 (lines=35) @@ | ||
692 | * |
|
693 | * @return array |
|
694 | */ |
|
695 | private function convertSqlResultSetMapping(Annotation\SqlResultSetMapping $resultSetMapping) |
|
696 | { |
|
697 | $entities = []; |
|
698 | ||
699 | foreach ($resultSetMapping->entities as $entityResultAnnot) { |
|
700 | $entityResult = [ |
|
701 | 'fields' => [], |
|
702 | 'entityClass' => $entityResultAnnot->entityClass, |
|
703 | 'discriminatorColumn' => $entityResultAnnot->discriminatorColumn, |
|
704 | ]; |
|
705 | ||
706 | foreach ($entityResultAnnot->fields as $fieldResultAnnot) { |
|
707 | $entityResult['fields'][] = [ |
|
708 | 'name' => $fieldResultAnnot->name, |
|
709 | 'column' => $fieldResultAnnot->column |
|
710 | ]; |
|
711 | } |
|
712 | ||
713 | $entities[] = $entityResult; |
|
714 | } |
|
715 | ||
716 | $columns = []; |
|
717 | ||
718 | foreach ($resultSetMapping->columns as $columnResultAnnot) { |
|
719 | $columns[] = [ |
|
720 | 'name' => $columnResultAnnot->name, |
|
721 | ]; |
|
722 | } |
|
723 | ||
724 | return [ |
|
725 | 'name' => $resultSetMapping->name, |
|
726 | 'entities' => $entities, |
|
727 | 'columns' => $columns |
|
728 | ]; |
|
729 | } |
|
730 | ||
731 | private function convertReflectionPropertyToFieldMetadata( |
|
732 | \ReflectionProperty $reflProperty, |