Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pkg/db/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (q *Query) Preload(table string, args ...string) *Query {
relations := strings.Split(table, ".")

if len(relations) > 3 {
raiden.Fatal("unsupported nested relations more than 3 levels")
raiden.Panic("unsupported nested relations more than 3 levels")
}

for i, relation := range relations {
Expand All @@ -48,7 +48,7 @@ func (q *Query) Preload(table string, args ...string) *Query {
}

if err != nil {
raiden.Fatal("could not find related model.")
raiden.Panic("could not find related model.")
}

relatedModelStruct := reflect.TypeOf(relatedModel)
Expand Down Expand Up @@ -80,7 +80,7 @@ func (q *Query) Preload(table string, args ...string) *Query {
relatedForeignKey, err = getTagValue(join, "foreignKey")

if err != nil {
raiden.Fatal("could not find foreign key in join tag.")
raiden.Panic("could not find foreign key in join tag.")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/db/select.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (q Query) Select(columns []string) (model *Query) {
column = split[1]
if !isValidColumnName(alias) {
err := fmt.Sprintf("invalid alias column name: \"%s\" name is invalid.", alias)
raiden.Fatal(err)
raiden.Panic(err)
}
} else {
column = c
Expand Down