Skip to content

Commit d0994af

Browse files
fix(cli): fixes final datasource class name on repository and service
closes #1771
1 parent dbe065f commit d0994af

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/cli/generators/repository/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator {
8686
);
8787

8888
this.artifactInfo.dataSourceClassName =
89-
this.artifactInfo.dataSourceName + 'DataSource';
89+
utils.toClassName(this.artifactInfo.dataSourceName) + 'DataSource';
9090
}
9191

9292
/**

packages/cli/generators/service/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ module.exports = class ServiceGenerator extends ArtifactGenerator {
205205
);
206206

207207
this.artifactInfo.dataSourceClassName =
208-
this.artifactInfo.dataSourceName + 'DataSource';
208+
utils.toClassName(this.artifactInfo.dataSourceName) + 'DataSource';
209209

210210
// Setting up data for templates
211211
this.artifactInfo.className = utils.toClassName(this.artifactInfo.name);

packages/cli/test/integration/generators/service.integration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('lb4 service', () => {
8686
);
8787
assert.fileContent(
8888
expectedFile,
89-
/protected datasource: mydsDataSource = new mydsDataSource\(\),/,
89+
/protected datasource: mydsDataSource = new MydsDataSource\(\),/,
9090
);
9191
assert.fileContent(
9292
expectedFile,

0 commit comments

Comments
 (0)