my commit

This commit is contained in:
Taras Machyshyn
2013-12-20 12:00:53 +02:00
parent 2268ba249f
commit b06155ece5
2 changed files with 7 additions and 3 deletions

View File

@@ -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(

View File

@@ -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;
}