hola-server 0.3.21 → 0.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/entity.js +7 -4
- package/package.json +1 -1
package/db/entity.js
CHANGED
|
@@ -184,10 +184,11 @@ class Entity {
|
|
|
184
184
|
const link_fields = [];
|
|
185
185
|
|
|
186
186
|
const attrs = {};
|
|
187
|
+
const fields_map = this.meta.fields_map;
|
|
187
188
|
attr_names.split(",").forEach((attr) => {
|
|
188
189
|
if (list_field_names.includes(attr)) {
|
|
189
190
|
attrs[attr] = 1;
|
|
190
|
-
const field =
|
|
191
|
+
const field = fields_map[attr];
|
|
191
192
|
if (field.link) {
|
|
192
193
|
link_fields.push(field);
|
|
193
194
|
attrs[field.link] = 1;
|
|
@@ -549,7 +550,7 @@ class Entity {
|
|
|
549
550
|
|
|
550
551
|
const field_names = this.meta.property_fields.map(f => f.name);
|
|
551
552
|
const attrs = {};
|
|
552
|
-
attr_names.split(",").forEach(
|
|
553
|
+
attr_names.split(",").forEach((attr) => {
|
|
553
554
|
if (field_names.includes(attr)) {
|
|
554
555
|
attrs[attr] = 1;
|
|
555
556
|
}
|
|
@@ -593,10 +594,12 @@ class Entity {
|
|
|
593
594
|
const ref_fields = [];
|
|
594
595
|
const link_fields = [];
|
|
595
596
|
const attrs = {};
|
|
596
|
-
|
|
597
|
+
|
|
598
|
+
const fields_map = this.meta.fields_map;
|
|
599
|
+
attr_names.split(",").forEach((attr) => {
|
|
597
600
|
if (field_names.includes(attr)) {
|
|
598
601
|
attrs[attr] = 1;
|
|
599
|
-
const field =
|
|
602
|
+
const field = fields_map[attr];
|
|
600
603
|
if (field.link) {
|
|
601
604
|
link_fields.push(field);
|
|
602
605
|
attrs[field.link] = 1;
|