|
@@ -1191,6 +1191,13 @@ func (statement *Statement) genSelectSQL(columnStr, condSQL string, needLimit, n
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (statement *Statement) processIDParam() error {
|
|
func (statement *Statement) processIDParam() error {
|
|
|
|
|
+ if statement.idParam != nil {
|
|
|
|
|
+ if statement.RefTable == nil {
|
|
|
|
|
+ return fmt.Errorf("ID condition is error, cant find ref table object")
|
|
|
|
|
+ } else if len(statement.RefTable.PKColumns()) == 0 {
|
|
|
|
|
+ return fmt.Errorf("ID condition is error, cant find table pkcolumns")
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if statement.idParam == nil || statement.RefTable == nil {
|
|
if statement.idParam == nil || statement.RefTable == nil {
|
|
|
return nil
|
|
return nil
|
|
|
}
|
|
}
|