Skip to content

Commit 0ee4d05

Browse files
committed
fix index creation
1 parent bb645d3 commit 0ee4d05

File tree

4 files changed

+13
-16
lines changed

4 files changed

+13
-16
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"symfony/cache": "^6.1.3",
1919
"symfony/http-client": "^6.1.3",
2020
"symfony/uid": "^6.1.3",
21-
"tarantool/mapper": "^5.0.8"
21+
"tarantool/mapper": "^5.0.9"
2222
},
2323
"autoload": {
2424
"psr-4": {

composer.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/Job/Space/CreateIndex.php

+1-8
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,9 @@ public function run(): void
2525
];
2626
$space->getMapper()->getClient()->call("box.space[$spaceId]:create_index", $this->name, [$options]);
2727
} elseif (is_array($this->fields)) {
28-
$properties = $space->getProperties();
29-
30-
$fields = $space->getFields();
31-
foreach ($this->fields as $index) {
32-
$fields[] = $properties[$index]->name;
33-
}
34-
3528
$space->createIndex([
3629
'name' => $this->name,
37-
'fields' => $fields,
30+
'fields' => $this->fields,
3831
'unique' => $this->unique,
3932
'type' => $this->type,
4033
]);

public/admin/js/Space/Indexes.js

+4
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ Ext.define('Admin.Space.Indexes', {
225225
text: 'Create',
226226
handler: () => {
227227
var values = win.down('form').getValues();
228+
var format = indexes.up('space-info').down('space-format').store;
229+
230+
values.fields = values.fields.map(i => format.getAt(i).get('name'));
231+
228232
var params = Ext.apply({
229233
name: values.name,
230234
fields: values.fields,

0 commit comments

Comments
 (0)