You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@EsEntity()
export class A {
@EsField({ type: 'text' })
a: string;
}
@EsEntity()
export class B extends A {
b: string;
}
When you run it, you will have the following exception:
const currentMappingProperty = mapping.properties.get(propertyName);
^
TypeError: Cannot read property 'properties' of undefined
at mergeProperties
It happens because it tries to access properties of the child class, but it just doesn't have any defined mapping properties. Can be fixed by adding a placeholder property to child class and decorate it with @EsField(), but I think it would be better if the service itself understood that there is no properties in the child class and didn't try to get them.
The text was updated successfully, but these errors were encountered:
Minimal way to reproduce:
When you run it, you will have the following exception:
It happens because it tries to access properties of the child class, but it just doesn't have any defined mapping properties. Can be fixed by adding a placeholder property to child class and decorate it with
@EsField()
, but I think it would be better if the service itself understood that there is no properties in the child class and didn't try to get them.The text was updated successfully, but these errors were encountered: