Navigation Menu

Skip to content

Commit

Permalink
Clear chached table names if domain id is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Aug 2, 2012
1 parent 13239a8 commit eba9bd5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/database/domain.js
Expand Up @@ -173,7 +173,12 @@ Domain.prototype = {
return this._id === undefined ? DEFAULT_ID : this._id ;
},
set id(value) {
return this._id = value;
this._id = value;
// clear caches
delete this._tableName;
delete this._termsTableName;
delete this._synonymTableName;
return value;
},

get domainId() {
Expand Down

0 comments on commit eba9bd5

Please sign in to comment.