Permalink
Browse files

feat(Mapping): add getType method

  • Loading branch information...
RWOverdijk committed Feb 20, 2017
1 parent 18e4b87 commit babe5f72bd4d719ddd6a41c1cccd37e24db7a17f
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/Mapping.ts
@@ -659,6 +659,17 @@ export class Mapping<T> {
return !!this.mapping.fetch(`relations.${property}`);
}
/**
* Get the type for a property.
*
* @param {string}property
*
* @returns {string}
*/
public getType(property: string): string {
return this.mapping.fetch(`fields.${property}.type`, 'string');
}
/**
* Get the relations for mapped entity.
*

0 comments on commit babe5f7

Please sign in to comment.