Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
ef79a2b4
Commit
ef79a2b4
authored
Jan 03, 2014
by
slene
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #440
parent
20cfece1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
db.go
orm/db.go
+2
-0
db_tables.go
orm/db_tables.go
+8
-3
No files found.
orm/db.go
View file @
ef79a2b4
...
...
@@ -461,6 +461,8 @@ func (d *dbBase) deleteRels(q dbQuerier, mi *modelInfo, args []interface{}, tz *
func
(
d
*
dbBase
)
DeleteBatch
(
q
dbQuerier
,
qs
*
querySet
,
mi
*
modelInfo
,
cond
*
Condition
,
tz
*
time
.
Location
)
(
int64
,
error
)
{
tables
:=
newDbTables
(
mi
,
d
.
ins
)
tables
.
skipEnd
=
true
if
qs
!=
nil
{
tables
.
parseRelated
(
qs
.
related
,
qs
.
relDepth
)
}
...
...
orm/db_tables.go
View file @
ef79a2b4
...
...
@@ -23,6 +23,7 @@ type dbTables struct {
tables
[]
*
dbTable
mi
*
modelInfo
base
dbBaser
skipEnd
bool
}
func
(
t
*
dbTables
)
set
(
names
[]
string
,
mi
*
modelInfo
,
fi
*
fieldInfo
,
inner
bool
)
*
dbTable
{
...
...
@@ -221,9 +222,13 @@ func (t *dbTables) parseExprs(mi *modelInfo, exprs []string) (index, name string
inner
=
false
}
jt
,
_
:=
t
.
add
(
names
,
mmi
,
fi
,
inner
)
jt
.
jtl
=
jtl
jtl
=
jt
if
num
==
i
&&
t
.
skipEnd
{
}
else
{
jt
,
_
:=
t
.
add
(
names
,
mmi
,
fi
,
inner
)
jt
.
jtl
=
jtl
jtl
=
jt
}
}
if
num
==
i
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment