Skip to content

Commit 347989d

Browse files
Merge pull request #156 from RobinBuschmann/issue-154
fixes #148 and #154
2 parents 6d7b4e1 + 4877d27 commit 347989d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/annotations/Table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function Table(arg: any): void|Function {
2020

2121
function annotate(target: any, options: IDefineOptions = {}): void {
2222

23-
if (!options.tableName) options.tableName = target.name;
23+
if (options.freezeTableName === undefined) options.freezeTableName = true;
2424

2525
options.instanceMethods = target.prototype;
2626
options.classMethods = target;

test/specs/table_column.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ describe('table_column', () => {
9595
expect(shoeDefineOptions).not.to.be.undefined;
9696
});
9797

98-
it('should have automatically inferred tableName', () => {
98+
it('should set freezeTableName to true', () => {
9999
const userDefineOptions = getOptions(User.prototype);
100100

101-
expect(userDefineOptions).to.have.property('tableName', User.name);
101+
expect(userDefineOptions).to.have.property('freezeTableName', true);
102102
});
103103

104104
it('should have explicitly defined tableName', () => {

0 commit comments

Comments
 (0)