|
@@ 109-117 (lines=9) @@
|
| 106 |
|
/** |
| 107 |
|
* {@inheritDoc} |
| 108 |
|
*/ |
| 109 |
|
public function createSchemata(EntityMetadata $metadata) |
| 110 |
|
{ |
| 111 |
|
if (!$metadata->persistence instanceof StorageMetadata) { |
| 112 |
|
throw PersisterException::badRequest('Wrong StorageMetadata type'); |
| 113 |
|
} |
| 114 |
|
$collection = $this->getQuery()->getModelCollection($metadata); |
| 115 |
|
$schemata = $metadata->persistence->schemata ?: []; |
| 116 |
|
return $this->schemaManager->createSchemata($collection, $schemata); |
| 117 |
|
} |
| 118 |
|
|
| 119 |
|
/** |
| 120 |
|
* {@inheritDoc} |
|
@@ 122-130 (lines=9) @@
|
| 119 |
|
/** |
| 120 |
|
* {@inheritDoc} |
| 121 |
|
*/ |
| 122 |
|
public function syncSchemata(EntityMetadata $metadata) |
| 123 |
|
{ |
| 124 |
|
if (!$metadata->persistence instanceof StorageMetadata) { |
| 125 |
|
throw PersisterException::badRequest('Wrong StorageMetadata type'); |
| 126 |
|
} |
| 127 |
|
$collection = $this->getQuery()->getModelCollection($metadata); |
| 128 |
|
$schemata = $metadata->persistence->schemata ?: []; |
| 129 |
|
return $this->schemaManager->syncSchemata($collection); |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
/** |
| 133 |
|
* {@inheritDoc} |