Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
ef79a2b4
authored
2014-01-04 00:04:15 +0800
by
slene
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix #440
1 parent
20cfece1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
orm/db.go
orm/db_tables.go
orm/db.go
View file @
ef79a2b
...
...
@@ -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 @
ef79a2b
...
...
@@ -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
Styling with
Markdown
is supported
Attach a file
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 post a comment