Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: go-gorm/gorm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: glb/gorm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 33 files changed
  • 2 contributors

Commits on Jan 19, 2018

  1. Add the ability to set the default Logger

    Sometimes you want to have a default logger that is used
    for all of your database connections; you can now set the
    default logger using `gorm.SetDefaultLogger`.
    glb committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    a2bcc5e View commit details
    Browse the repository at this point in the history
  2. Call Query callback chain when preloading many2many

    When using `Preload` on a `many2many` association, the
    `Query` callback chain was not being called. This made
    it difficult to write a plugin that could reliably get
    called regardless of how objects were being queried.
    
    Now `handleManyToManyPreload` will call the `Query`
    callback chain for each object that is retrieved by
    following the association.
    
    Since the data has already been read by the
    `handleManyToManyPreload` method, a new scope setting
    called `gorm:skip_queryCallback` is set to `true` before
    calling the callbacks. Callbacks can check for the
    presence of this setting if they should not be run; the
    default `queryCallback` is an example of this case.
    
    Fixes jinzhu/gorm#1621.
    glb committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    e5f4e50 View commit details
    Browse the repository at this point in the history
  3. Send callback logs to default logger

    Adding / removing / replacing callbacks create logs; these logs
    should be sent to `defaultLogger` rather than to the `log` system,
    so that they can be properly processed.
    glb committed Jan 19, 2018
    Configuration menu
    Copy the full SHA
    1360844 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2018

  1. Utilize go1.8 context support in database/sql

    Fixes #1231
    
    The related go1.8 release notes: https://golang.org/doc/go1.8#database_sql
    remohammadi authored and glb committed Jan 22, 2018
    Configuration menu
    Copy the full SHA
    14beec1 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2018

  1. Make db.Save() error when saving an existing record affects 0 rows

    Saving a record with a non-Zero primary key previously would re-create
    the record if the update affected zero rows. Now there will be an error
    `ErrRecordNotFound` returned.
    glb committed Jun 5, 2018
    Configuration menu
    Copy the full SHA
    b404e44 View commit details
    Browse the repository at this point in the history
Loading