r=dryDB.Table("(?) as u",DB.Model(&User{}).Select("name")).Find(&User{}).Statement
if!regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE .users.\\..deleted_at. IS NULL\\) as u WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()){
t.Errorf("Table with escape character, got %v",r.Statement.SQL.String())
}
r=dryDB.Table("(?) as u, (?) as p",DB.Model(&User{}).Select("name"),DB.Model(&Pet{}).Select("name")).Find(&User{}).Statement
if!regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE .users.\\..deleted_at. IS NULL\\) as u, \\(SELECT .name. FROM .pets. WHERE .pets.\\..deleted_at. IS NULL\\) as p WHERE .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()){
t.Errorf("Table with escape character, got %v",r.Statement.SQL.String())
r=dryDB.Where("name = ?",1).Table("(?) as u, (?) as p",DB.Model(&User{}).Select("name").Where("name = ?",2),DB.Model(&Pet{}).Where("name = ?",4).Select("name")).Where("name = ?",3).Find(&User{}).Statement
if!regexp.MustCompile("SELECT \\* FROM \\(SELECT .name. FROM .users. WHERE name = .+ AND .users.\\..deleted_at. IS NULL\\) as u, \\(SELECT .name. FROM .pets. WHERE name = .+ AND .pets.\\..deleted_at. IS NULL\\) as p WHERE name = .+ AND name = .+ AND .u.\\..deleted_at. IS NULL").MatchString(r.Statement.SQL.String()){
t.Errorf("Table with escape character, got %v",r.Statement.SQL.String())