Comments (1)
TLDR: It's possible that statements prepared on one database connection aren't available on another. When using a connection pooler the prepare / query execution may use different connections.
Thank you for your report, but seems like not an issue for GORM, GORM will use the same connection for cached prepared statement https://github.com/go-gorm/gorm/blob/0b6ef3cb87b0f27247ac349383b5cded02d00293/prepare_stmt.go#L76-L78
and for transactions, it should works also, refer https://github.com/go-gorm/gorm/blob/0b6ef3cb87b0f27247ac349383b5cded02d00293/prepare_stmt.go#L119
from gorm.io.
Related Issues (20)
- orm.AutoMigrate(&aModel{}) occurs error "pq: got 1 parameters but the statement requires 0" HOT 1
- [Question] AutoMigrate runs migration ever it's no field change in struct
- How can i use proload with scopes to query
- Log duplication in gen/generator.go
- [Question] Query logging/debug produces sql output inconsistent with the server executed query
- [Question] Code blocks always cover the sidebar
- [Korean Translation] I'd like to start translating it in Korean HOT 1
- [New Translation] Language Name
- [New Translation] Language Name
- [Question] Unclear when default transaction is committed
- Fix the z-index of the Contents section of the docs
- [Question] Generated SQL not correct for Update Selected Fields
- [New Translation] Traditional Chinese
- [Question]
- [New Translation] Korean
- [Question]
- [New Translation] Language Name
- [Question] Bad examples about nested struct HOT 1
- [Question] How i roll back the database??? HOT 2
- Typo in migration.html#Atlas-Integration HOT 1
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 gorm.io.