Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend
This commit is contained in:
@@ -89,14 +89,14 @@ class Links
|
||||
}
|
||||
|
||||
|
||||
protected function belongsToParent($params, $foreignParams)
|
||||
/*protected function belongsToParent($params, $foreignParams)
|
||||
{
|
||||
return $this->getRelations()->belongsToParent($params, $foreignParams);
|
||||
}
|
||||
}*/
|
||||
|
||||
protected function linkParent($params, $foreignParams)
|
||||
{
|
||||
return $this->getRelations()->belongsToParent($params, $foreignParams);
|
||||
return $this->getRelations()->linkParent($params, $foreignParams);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ class Relations
|
||||
$params['link']['name'].'Name' => array(
|
||||
'type' => Entity::FOREIGN,
|
||||
'relation' => $params['link']['name'],
|
||||
'notStorable' => true,
|
||||
//'notStorable' => true,
|
||||
'foreign' => $this->getForeignField('name', $foreignParams['entityName']),
|
||||
),
|
||||
$params['link']['name'].'Id' => array(
|
||||
@@ -188,7 +188,8 @@ class Relations
|
||||
}
|
||||
|
||||
//uses for belongsToParent and linkParent
|
||||
public function belongsToParent($params, $foreignParams)
|
||||
//public function belongsToParent($params, $foreignParams)
|
||||
public function linkParent($params, $foreignParams)
|
||||
{
|
||||
$relation = array();
|
||||
|
||||
|
||||
@@ -27,6 +27,10 @@ class Schema
|
||||
'len' => '24',
|
||||
);
|
||||
|
||||
protected $notStorableTypes = array(
|
||||
'foreign'
|
||||
);
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->dbalSchema = new \Doctrine\DBAL\Schema\Schema();
|
||||
@@ -55,7 +59,7 @@ class Schema
|
||||
$uniqueColumns = array();
|
||||
foreach ($entityParams['fields'] as $fieldName => $fieldParams) {
|
||||
|
||||
if (isset($fieldParams['notStorable']) && $fieldParams['notStorable']) {
|
||||
if ((isset($fieldParams['notStorable']) && $fieldParams['notStorable']) || in_array($fieldParams['type'], $this->notStorableTypes)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -81,7 +85,7 @@ class Schema
|
||||
|
||||
$fieldType = isset($fieldParams['dbType']) ? $fieldParams['dbType'] : $fieldParams['type'];
|
||||
if (!in_array($fieldType, $this->typeList)) {
|
||||
$GLOBALS['log']->add('DEBUG', 'Field type ['.$fieldType.'] does not exist '.$entityName.':'.$fieldName);
|
||||
$GLOBALS['log']->add('DEBUG', 'Converters/Schema::process(): Field type ['.$fieldType.'] does not exist '.$entityName.':'.$fieldName);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user