Giter VIP home page Giter VIP logo

website's People

Contributors

drhayt avatar gr4y avatar lunny avatar nashtsai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

使用sqlserver 2012,插入数据Id无法回传问题

数据库为sqlserver 2012
相关包 code.google.com/p/odbc
struct example:

type Group struct {
Id int64
Title string
}

使用xorm同步表结构
使用xorm插入数据:

group := new(Group)
            if _, err := engine.Insert(group); err != nil {
                panic(err)
            }
            log.Println("groupId:", group.Id)

打印的groupId永远为0.
查看数据库数据id为自增状态!

使用Join时Find函数里面的条件并没有加入到sql语句中

问题:
DbEngine.Join("INNER", "device_app", "device.sn=device_app.sn").
Join("INNER", "app", "app.id=device_app.app_id").
Desc("app.id").Limit(limit, start).Find(&devs, orm.Device{Sn: req.Sn})
打印出来的语句:
SELECT * FROM device INNER JOIN device_app ON device.sn=device_app.sn INNER JOIN app ON app.id=device_app.app_id ORDER BY app.id DESC LIMIT 1 OFFSET 1

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.