Permalink
Browse files

feat(Mapping): set default cascades

  • Loading branch information...
RWOverdijk committed Jan 22, 2017
1 parent c82e7ca commit 4be6aaa7e738c3adf3725e3c1d575047d06d2772
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Mapping.ts
@@ -190,7 +190,9 @@ export class Mapping<T> {
let toUnderscore = entityManager.getConfig().fetch('mapping.defaultNamesToUnderscore');
let propertyName = toUnderscore ? this.nameToUnderscore(property) : property;
let field = this.mapping.fetchOrPut(`fields.${property}`, {});
let field = this.mapping.fetchOrPut(`fields.${property}`, {
cascades: entityManager.getConfig().fetch('mapping.defaults.cascades', [])
});
if (field.name) {
this.mapping.remove(`columns.${this.getColumnName(property)}`);

0 comments on commit 4be6aaa

Please sign in to comment.