Coder Social home page Coder Social logo

怎么用gorm原生功能 about goravel HOT 6 CLOSED

goravel avatar goravel commented on July 18, 2024
怎么用gorm原生功能

from goravel.

Comments (6)

hwbrzzl avatar hwbrzzl commented on July 18, 2024

Hi,目前可以临时使用下面代码获取 gorm 实例,后续对于 Clauses 的官方支持还需要调研一下。使用框架过程中有任何问题欢迎随时沟通 👍

import "github.com/goravel/framework/database"

gorm, _ := database.NewGormInstance("mysql")

from goravel.

hwbrzzl avatar hwbrzzl commented on July 18, 2024

Please reopen this issue if you have any other questions.

from goravel.

wingofsky avatar wingofsky commented on July 18, 2024

@hwbrzzl Gorm自带的AutoMigrate对于我来说很好用(比Laravel简单),期望后续可以有类似的实现

from goravel.

ihipop avatar ihipop commented on July 18, 2024

什么时候能升级到 gorm 2.0 呢

from goravel.

hwbrzzl avatar hwbrzzl commented on July 18, 2024

@wingofsky AutoMigrate 的方式在生产环境有较大风险,Goravel 还是期望实现类似 Laravel 一样的迁移功能。

from goravel.

hwbrzzl avatar hwbrzzl commented on July 18, 2024

@ihipop 目前已经是 2.0 了,可以参考这个文档:https://gorm.io/docs/v2_release_note.html

from goravel.

Related Issues (20)

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.