create (DataMapper::Adapters::DataObjectsAdapter)

    # File lib/dm-core/adapters/data_objects_adapter.rb, line 30
          def create(resources)
            resources.each do |resource|
              model      = resource.model
              serial     = model.serial(name)
              attributes = resource.dirty_attributes

              properties  = []
              bind_values = []

              # make the order of the properties consistent
              model.properties(name).each do |property|
                next unless attributes.key?(property)

                bind_value = attributes[property]

                # skip insering NULL for columns that are serial or without a default
                next if bind_value.nil? && (property.serial? || !property.default?)

                # if serial is being set explicitly, do not set it again
                if property.equal?(serial)
                  serial = nil
                end

                properties  << property
                bind_values << bind_value
              end

              statement = insert_statement(model, properties, serial)
              result    = execute(statement, *bind_values)

              if result.to_i == 1 && serial
                serial.set!(resource, result.insert_id)
              end
            end
          end