elastic-orm
Advanced tools
Comparing version 0.3.6 to 0.4.0
@@ -5,5 +5,5 @@ import { EsType } from '../types/Es.type'; | ||
import { ClassType } from '../types/Class.type'; | ||
export declare function EsProperty(entity: ClassType<unknown>, option2?: EsPropertyOptions): PropertyDecorator; | ||
export declare function EsProperty(entity: ClassType<unknown>, option?: EsPropertyOptions): PropertyDecorator; | ||
export declare function EsProperty(options: EsNestedTypedOptions): PropertyDecorator; | ||
export declare function EsProperty(options: EsPropertyTypedOptions): PropertyDecorator; | ||
export declare function EsProperty(type: EsType, options?: EsPropertyOptions): PropertyDecorator; |
@@ -12,2 +12,3 @@ "use strict"; | ||
additionalFieldOptions: {}, | ||
name: name, | ||
}; | ||
@@ -14,0 +15,0 @@ let propertyOptions; |
@@ -8,2 +8,3 @@ import { EsFieldPropertyOptions } from './EsFieldPropertyOptions.interface'; | ||
isId?: boolean; | ||
name?: string; | ||
} | ||
@@ -10,0 +11,0 @@ export interface EsNestedTypedOptions { |
@@ -39,7 +39,6 @@ "use strict"; | ||
if (prop.isNested) { | ||
dbEntityData[prop.options.entityPropName] = this.normalizeProps(entity[prop.options.entityPropName], prop.props, meta); | ||
dbEntityData[prop.options.name] = this.normalizeProps(entity[prop.options.entityPropName], prop.props, meta); | ||
} | ||
else { | ||
dbEntityData[prop.options.entityPropName] = | ||
entity[prop.options.entityPropName]; | ||
dbEntityData[prop.options.name] = entity[prop.options.entityPropName]; | ||
} | ||
@@ -75,3 +74,3 @@ } | ||
for (const prop of props) { | ||
const strategyPropName = prop.options.entityPropName; | ||
const strategyPropName = prop.options.name; | ||
if (dbEntityData[strategyPropName] !== undefined) { | ||
@@ -78,0 +77,0 @@ if (prop.isNested) { |
{ | ||
"name": "elastic-orm", | ||
"version": "0.3.6", | ||
"version": "0.4.0", | ||
"description": "Elasticsearch object relational mapper.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
178293
1824