Skip to content

Instantly share code, notes, and snippets.

@colllin
Last active August 29, 2015 14:12
Show Gist options
  • Save colllin/adf4626cc3e38391e5f7 to your computer and use it in GitHub Desktop.
Save colllin/adf4626cc3e38391e5f7 to your computer and use it in GitHub Desktop.

Revisions

  1. colllin revised this gist Jan 6, 2015. No changes.
  2. colllin revised this gist Jan 6, 2015. No changes.
  3. colllin created this gist Jan 6, 2015.
    18 changes: 18 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    > Polygons.deny({update: function() { return true; }});
    > p=Polygons.findOne();
    { _id: '74iGubCqxB29ZF2tJ',
    geom:
    { type: 'Polygon',
    coordinates: [ [Object] ],
    type2: 'Polygonal' },
    tags: {} }
    > Polygons.update({_id: p._id}, {$set: {'geom.type2': 'Polygonify'}})
    1
    > Polygons.findOne(p._id)
    { _id: '74iGubCqxB29ZF2tJ',
    geom:
    { type: 'Polygon',
    coordinates: [ [Object] ],
    type2: 'Polygonify' },
    tags: {} }
    >