       @constructor._collection.remove @id
       @id = null
 
-  # Dont allow direct access to _id and _type.
-  @mongoize: (attributes) ->
+  mongoize: (attributes) ->
+    taken = {}
     for name, value of attributes
-      delete attributes[name] if name in ['_id', '_type']
-    
-    attributes
+      continue if name.match(/^_/)
+      taken[name] = value
+    taken
 
-  # Demongoize is just an alias for mongoize.
-  @demongoize: @mongoize
+  demongoize: (attributes) ->
+    taken = {}
+    for name, value of attributes
+      continue if name.match(/^_/)
+      taken[name] = value
+    taken
 
   @_collection: undefined
 


  save: ->
    return false unless @isValid()

    attributes = @constructor.mongoize(@attributes)
    if @isPersisted()
      @constructor._collection.update @id, { $set: attributes }
    else
      @id = @constructor._collection.insert attributes

    this

  update: (@attributes) ->

  attributes: {}

  constructor: (attributes = {}) ->
    if attributes._id
      @attributes = @demongoize(attributes)
      @id = attributes._id
    else
      @attributes = attributes

  isPersisted: -> @id?

