File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,28 @@ MySQL.prototype.connect = function(callback) {
108108
109109function generateOptions ( settings ) {
110110 const s = settings || { } ;
111+ const generatorSpecificOptions = [
112+ 'name' ,
113+ 'connector' ,
114+ 'sharedData' ,
115+ 'forwardErrorToEnvironment' ,
116+ 'skipLocalCache' ,
117+ '_' ,
118+ 'c' ,
119+ 'y' ,
120+ 'initialGenerator' ,
121+ 'resolved' ,
122+ 'namespace' ,
123+ 'skip-cache' ,
124+ 'skip-install' ,
125+ 'force-install' ,
126+ 'ask-answered' ,
127+ 'config' ,
128+ 'yes' ,
129+ 'url' ,
130+ 'engine' ,
131+ 'collation' ,
132+ ] ;
111133 if ( s . collation ) {
112134 // Charset should be first 'chunk' of collation.
113135 s . charset = s . collation . substr ( 0 , s . collation . indexOf ( '_' ) ) ;
@@ -148,7 +170,10 @@ function generateOptions(settings) {
148170 // Take other options for mysql driver
149171 // See https://github.com/loopbackio/loopback-connector-mysql/issues/46
150172 for ( const p in s ) {
151- if ( p === 'database' && s . createDatabase ) {
173+ if (
174+ ( p === 'database' && s . createDatabase ) ||
175+ generatorSpecificOptions . includes ( p )
176+ ) {
152177 continue ;
153178 }
154179 if ( options [ p ] === undefined ) {
You can’t perform that action at this time.
0 commit comments