Comments (5)
I don't use them, but it looks like this bug will affect pretty much every SQL connector, not just PG, since they all have copies of the same "is this my transaction" check:
- https://github.com/loopbackio/loopback-connector-mysql/blob/9045ad868ce07e5b7468429566c358ea5fdbf9f6/lib/mysql.js#L246
- https://github.com/loopbackio/loopback-connector-oracle/blob/ba7f88886dd49b091c54e25d5d08421ac934c680/lib/oracle.js#L208
- https://github.com/loopbackio/loopback-connector-sqlite3/blob/f72c27bfaadc2b58e6dec8427bd572bd70c0da14/lib/sqlite3.js#L158
- https://github.com/loopbackio/loopback-connector-mssql/blob/cfb97efa83e0684446a1ed617c3c6bca95279d92/lib/mssql.js#L121
from loopback-next.
@OnTheThirdDay as the author of the PR that caused this, any thoughts?
It looks like this could be fixed by just using a shallow clone / spread of the options object instead of a deep clone?
from loopback-next.
Oh I see.. would the following work? I think maybe just don't clone it would be fine. Sorry that I can't quite remember why I deep-cloned it instead of using the options directly..
Object.assign(options ?? {}, {polymorphicType: key}),
from loopback-next.
@OnTheThirdDay Yep, that's roughly what I submitted as #10195, but I used spread syntax in my PR. Is there a particular benefit of using Object.assign
here instead of a spread?
from loopback-next.
@mgabeler-lee-6rs I think not much difference, just a styling thing across the repo.
from loopback-next.
Related Issues (20)
- [@loopback/build] - lb-tsc: not found. Because NODE_ENV = production HOT 1
- Rest nested include
- How to integrate passport authentication without express web app?
- [@loopback/sequelize] Regression in query behavior when undefined values passed to "where" filter
- Error creating todo-list application HOT 1
- [@loopback/sequelize] Boolean values from Loopback "where" filter are not serialized correctly
- [@loopback/sequelize] Scope setting on Loopback Model is ignored by Sequelize extension
- @loopback/rest - v13.1.3 request validation fails
- [@loopback/sequelize] Test sandbox directory is included in the published NPM package
- [@loopback/sequelize] Typescript error when using the "required" property with Sequelize HOT 2
- Error when running `npm run tsdocs`
- @loopback/repository 6.1.4 broke hasManyThrough relations HOT 4
- [@loopback/sequelize] contains & match (extendedOperators) are not working HOT 1
- [@loopback/sequelize] SQL select error if an empty string "order" is passed to SequelizeRepository find / findOne methods
- Options param in SequelizeRepository create methods issue HOT 1
- ESLint: naming convention errors on certain third-party imports
- [@loopback/build] not copying non-TypeScript files with --copy-resources flag from v9.0.10
- Docs: `npm run build:site` command fails because of recent update by lerna v7
- getModelSchemaRef does not include the nested model definition HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-next.