Comments (1)
url := oracle.BuildUrl("127.0.0.1", "1521", "service", "user", "password", options)
dialector := oracle.New(oracle.Config{
DSN: url,
IgnoreCase: false, // 查询条件值是否不区分大小写
NamingCaseSensitive: true, // 命名是否区分大小写
})
在 Oracle 数据库中,字段 "field_name"
和 field_name
属于不同的字段。未使用双引号包裹的字段名和表名会自动转换为大写,无法匹配使用双引号包裹的小写字段名和表名。
如果启用了 NamingCaseSensitive
选项,GORM 驱动会使用双引号包裹生成的字段名和表名,就会区分大小写。若不需要区分大小写请关闭此选项,但必须保证数据库中的字段名和表名都是大写。
如果还有问题,请进一步提供问题详细说明,如使用 GORM 的相关代码及对应执行的 SQL 语句。
from gorm-oracle.
Related Issues (13)
- CLOB 字段数据过长时报 ORA-01461: 仅能绑定要插入 LONG 列的 LONG 值
- 使用 gorm.io/gen 创建数据时无法获取自增主键返回值(insert 语句主键 id 获取不到) HOT 20
- Oracle11 以上版本数据库查询数据使用 Limit(-1) 时也会设置默认排序字段 HOT 1
- 能用在生产环境嘛? HOT 3
- 分页问题 HOT 1
- Using `schema.Namer` to support customize naming strategy
- Oracle stored procedure OUT Variables HOT 1
- when a entity has a `[]byte` field, call `AutoMigrate()` throw ` ORA-22859: invalid modification of columns` HOT 1
- 结构体中如果存在保留字段,默认会多加一对双引号,导致数据库自动创建表失败。 HOT 1
- 在gorm的自定义类型`JSONMap` 时,在已生成表的情况下,再次运行数据库迁移报`ORA-22859: 无效的列修改` HOT 1
- 插入数据时缺少 `[]byte`到 `BLOB` 类型的转换,插入数据不成功 HOT 3
- 密码带特殊字符,报错 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-oracle.