added ...Ids, ...Names fields for HasChildren, HasMany, ManyMany relationships

This commit is contained in:
Taras Machyshyn
2014-01-16 18:06:51 +02:00
parent e153f2fe40
commit ba228de600
3 changed files with 30 additions and 0 deletions
@@ -9,6 +9,16 @@ class HasChildren extends \Espo\Core\Utils\Database\Orm\Base
{
return array(
$params['entityName'] => array (
'fields' => array(
$params['link']['name'].'Ids' => array(
'type' => 'varchar',
'notStorable' => true,
),
$params['link']['name'].'Names' => array(
'type' => 'varchar',
'notStorable' => true,
),
),
'relations' => array(
$params['link']['name'] => array(
'type' => 'hasChildren',
@@ -9,6 +9,16 @@ class HasMany extends \Espo\Core\Utils\Database\Orm\Base
{
$relation = array(
$params['entityName'] => array (
'fields' => array(
$params['link']['name'].'Ids' => array(
'type' => 'varchar',
'notStorable' => true,
),
$params['link']['name'].'Names' => array(
'type' => 'varchar',
'notStorable' => true,
),
),
'relations' => array(
$params['link']['name'] => array(
'type' => 'hasMany',
@@ -11,6 +11,16 @@ class ManyMany extends \Espo\Core\Utils\Database\Orm\Base
{
return array(
$params['entityName'] => array(
'fields' => array(
$params['link']['name'].'Ids' => array(
'type' => 'varchar',
'notStorable' => true,
),
$params['link']['name'].'Names' => array(
'type' => 'varchar',
'notStorable' => true,
),
),
'relations' => array(
$params['link']['name'] => array(
'type' => 'manyMany',