Permalink
Browse files

fix(Mapping): Allow missing fields

  • Loading branch information...
RWOverdijk committed Oct 7, 2016
1 parent ceb7b84 commit f833ea1845bda86d12bfa0935a4bb7147b3a1fff
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Mapping.ts
@@ -559,7 +559,7 @@ export class Mapping<T> {
* @returns {JoinColumn}
*/
public getJoinColumn(property: string): JoinColumn {
let field = this.getField(property);
let field = this.mapping.fetchOrPut(`fields.${property}`, {});
if (!field.joinColumn) {
field.joinColumn = {
@@ -582,7 +582,7 @@ export class Mapping<T> {
* @returns {JoinTable}
*/
public getJoinTable(property: string, entityManager?: EntityManager| Scope): JoinTable {
let field = this.getField(property);
let field = this.mapping.fetchOrPut(`fields.${property}`, {});
if (!field.joinTable) {
if (!entityManager) {

0 comments on commit f833ea1

Please sign in to comment.