mirror of https://github.com/go-gorm/gorm.git
Better compatibility for complex sql type
This commit is contained in:
parent
eeb9ba2250
commit
8a2b73723d
|
@ -461,8 +461,8 @@ func parseTagSetting(str string) map[string]string {
|
||||||
for _, value := range tags {
|
for _, value := range tags {
|
||||||
v := strings.Split(value, ":")
|
v := strings.Split(value, ":")
|
||||||
k := strings.TrimSpace(strings.ToUpper(v[0]))
|
k := strings.TrimSpace(strings.ToUpper(v[0]))
|
||||||
if len(v) == 2 {
|
if len(v) >= 2 {
|
||||||
setting[k] = v[1]
|
setting[k] = strings.Join(v[1:], ":")
|
||||||
} else {
|
} else {
|
||||||
setting[k] = k
|
setting[k] = k
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue