libraries/AssociationManagement.rb
def save
      das = []
      @map.each_key do |key|
        if key == DATAMATRIX_KEY
          das.concat save_data_matrix_alt(@object, @map[key])
        elsif @map[key].is_a? UploadAssoc
          # TODO: update this to lazy associate once aq is updated to hav lazy upload assoc (on master, just not on server yet)
          @object.associate(key, @map[key].tag, @map[key].upload)
        else
          das << @object.lazy_associate(key, @map[key])
        end
      end
      DataAssociation.import(das, on_duplicate_key_update: [:object]) unless das.empty?
      @object.save
      nil
    end
# Saves the associations in this map to Aquarium.
Saves the associations in this map to Aquarium.
Saves the associations in this map to Aquarium .
def save
      das = []
      @map.each_key do |key|
        if key == DATAMATRIX_KEY
          das.concat save_data_matrix_alt(@object, @map[key])
        elsif @map[key].is_a? UploadAssoc
          @object.associate(key, @map[key].tag, @map[key].upload)
        else
          das << @object.lazy_associate(key, @map[key])
        end
      end
      DataAssociation.import(das, on_duplicate_key_update: [:object]) unless das.empty?
      @object.save
      nil
    end
def save das = [ ] @map . each_key do | key | if key == DATAMATRIX_KEY das . concat save_data_matrix_alt ( @object , @map [ key ] ) elsif @map [ key ] . is_a? UploadAssoc @object . associate ( key , @map [ key ] . tag , @map [ key ] . upload ) else das << @object . lazy_associate ( key , @map [ key ] ) end end DataAssociation . import ( das , on_duplicate_key_update : [ :object ] ) unless das . empty? @object . save nil end
Saves the associations in this map to Aquarium.
Saves the associations in this map to Aquarium .
# TODO: update this to lazy associate once aq is updated to hav lazy upload assoc (on master, just not on server yet)