mirror of https://github.com/go-gorm/gorm.git
Support specify select/omit columns with table
This commit is contained in:
parent
6312d86c54
commit
bfda75d099
|
@ -628,7 +628,7 @@ func (stmt *Statement) Changed(fields ...string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
var nameMatcher = regexp.MustCompile(`\.[\W]?(.+?)[\W]?$`)
|
||||
var nameMatcher = regexp.MustCompile(`^[\W]?(?:[a-z_]+?)[\W]?\.[\W]?([a-z_]+?)[\W]?$`)
|
||||
|
||||
// SelectAndOmitColumns get select and omit columns, select -> true, omit -> false
|
||||
func (stmt *Statement) SelectAndOmitColumns(requireCreate, requireUpdate bool) (map[string]bool, bool) {
|
||||
|
|
Loading…
Reference in New Issue