Skip to content

Commit

Permalink
Merge pull request #2 from sqdk/sqdk-patch-2-warn
Browse files Browse the repository at this point in the history
Update gorp.go
  • Loading branch information
sqdk committed Feb 16, 2015
2 parents b943032 + c5d4bb0 commit 9a61cb5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gorp.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"regexp"
"strings"
"time"
"log"
"os"
)

// Oracle String (empty string is null)
Expand Down Expand Up @@ -776,6 +778,7 @@ func (m *DbMap) readStructColumns(t reflect.Type) (cols []*ColumnMap, version *C
cols = append(cols, cm)
}
if cm.fieldName == "Version" {
log.New(os.Stderr, "", log.LstdFlags).Println("Warning: Automatic mapping of Version struct members to version columns (see optimistic locking) will be deprecated in next version (V2) See: https://github.com/go-gorp/gorp/pull/214")
version = cm
}
}
Expand Down

0 comments on commit 9a61cb5

Please sign in to comment.