Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. db.coll.update(
  2. { article: 100500 },
  3. {
  4. $set: { a: 555 },
  5. $pull: { arr: { t: { $lt: 20 } } }
  6. }
  7. );
  8.  
  9. {
  10. article: 100500,
  11. a: 400,
  12. arr: [
  13. { t: 30, b: 12, n: 90 },
  14. { t: 10, b: 16, n: 60 }
  15. ]
  16. }
  17.  
  18. {
  19. article: 100500,
  20. a: 555, /* Тут было: 400 */
  21. arr: [
  22. { t: 30, b: 777, n: 90 },
  23. /* Тут был элемент массива */
  24. ]
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement