Giter Club home page Giter Club logo

Comments (1)

iTanken avatar iTanken commented on August 17, 2024 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.