This commit is contained in:
Lunny Xiao 2016-07-09 12:29:35 +08:00
parent 811443400f
commit 24600f0f5f
1 changed files with 1 additions and 0 deletions

View File

@ -1888,6 +1888,7 @@ func (session *Session) _row2Bean(rows *core.Rows, fields []string, fieldsCount
} else if session.Statement.UseCascade {
table := session.Engine.autoMapType(*fieldValue)
if table != nil {
hasAssigned = true
if len(table.PrimaryKeys) != 1 {
panic("unsupported non or composited primary key cascade")
}