Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
jio
Commits
6e1e399f
Commit
6e1e399f
authored
Jun 07, 2017
by
Vincent Bechu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mappingstorage: WIP fix post issue with id mapped
parent
ed4f6d82
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
src/jio.storage/mappingstorage.js
src/jio.storage/mappingstorage.js
+12
-2
No files found.
src/jio.storage/mappingstorage.js
View file @
6e1e399f
...
...
@@ -334,12 +334,22 @@
this
,
doc
),
id
=
doc
[
this
.
_property_for_sub_id
];
id
=
doc
[
this
.
_property_for_sub_id
],
storage
=
this
;
if
(
this
.
_property_for_sub_id
&&
id
!==
undefined
)
{
return
this
.
_sub_storage
.
put
(
id
,
sub_doc
);
}
if
(
!
this
.
_id_mapped
||
doc
[
this
.
_id_mapped
]
!==
undefined
)
{
return
this
.
_sub_storage
.
post
(
sub_doc
);
return
getSubStorageId
(
storage
,
id
,
doc
)
.
push
(
function
(
sub_id
)
{
return
storage
.
_sub_storage
.
put
(
sub_id
,
sub_doc
);
})
.
push
(
undefined
,
function
(
error
)
{
if
(
error
instanceof
jIO
.
util
.
jIOError
)
{
return
storage
.
_sub_storage
.
post
(
sub_doc
);
}
throw
error
;
});
}
throw
new
jIO
.
util
.
jIOError
(
"
post is not supported with id mapped
"
,
...
...
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