anchor.diff:  			<%- ass_cols.each_value do |opts| -%>
   				<%- if opts.key? :dependent -%>
   					<%- if opts.key? :foreign_key -%>
  -    Destroy<%= opts[:class_name].pluralize %>Where("<%= opts[:foreign_key] %> = ?", id)
  +    where := fmt.Sprintf("<%= opts[:foreign_key] %> IN (?%s)", idsHolder)
  +    Destroy<%= opts[:class_name].pluralize %>Where(where, idsT)
   					<%- else -%>
  -    Destroy<%= opts[:class_name].pluralize %>Where("<%= model_name_underscore %>_id = ?", id)
  -					<%- end -%>
  -				<%- end -%>
  -			<%- end -%>
  -		<%- end -%>
  -	<%- end -%>
  -	return nil
  -}
  -
  -func Destroy<%= @model_name.pluralize %>(ids ...int64) (int64, error) {
  -	if len(ids) == 0 {
  -		msg := "At least one or more ids needed"
  -		log.Println(msg)
  -		return 0, errors.New(msg)
  -	}
  -	idsStr := strings.Trim(strings.Replace(fmt.Sprint(ids), " ", ",", -1), "[]")
  -	sql := fmt.Sprintf(`DELETE FROM <%= table_name %> WHERE id IN (%s)`, idsStr)
  -	stmt, err := db.Preparex(sql)
  -	result, err := stmt.Exec()
  -	if err != nil {
  -		return 0, err
  -	}
  -	cnt, err := result.RowsAffected()
  -	if err != nil {
  -		return 0, err
  -	}
  -	<%- [:has_many, :has_one].each do |ass| -%>
  -		<%- ass_cols = @struct_info[:assoc_info][ass] -%>
  -		<%- unless ass_cols.empty? -%>
  -			<%- ass_cols.each_value do |opts| -%>
  -				<%- if opts.key? :dependent -%>
  -					<%- if opts.key? :foreign_key -%>
  -    where := fmt.Sprintf("<%= opts[:foreign_key] %> IN (%s)", idsStr)
  -    Destroy<%= opts[:class_name].pluralize %>Where(where)
  -					<%- else -%>
  -	where := fmt.Sprintf("<%= model_name_underscore %>_id IN (%s)", idsStr)
  -    Destroy<%= opts[:class_name].pluralize %>Where(where)
  +	where := fmt.Sprintf("<%= model_name_underscore %>_id IN (?%s)", idsHolder)
  +    Destroy<%= opts[:class_name].pluralize %>Where(where, idsT)
   					<%- end -%>
   				<%- end -%>
   			<%- end -%>
  
positive.code: 		return nil, errors.New(msg)
  	}
  	var_<%= param_name_plural %> := []<%= @model_name %>{}
  	idsStr := strings.Trim(strings.Replace(fmt.Sprint(ids), " ", ",", -1), "[]")
  	sql := fmt.Sprintf(`SELECT * FROM <%= table_name %> WHERE id IN (%s)`, idsStr)
  	err := db.Select(&var_<%= param_name_plural %>, sql)
  	if err != nil {
  		log.Printf("Error: %v\n", err)
  		return nil, err
  
negative.code: 	<%- has_many = @struct_info[:assoc_info][:has_many] -%>
  	<%- has_many.each do |k, v| -%>
  func (var_<%= model_name_underscore %> *<%= @model_name %>) <%= v[:class_name].pluralize %>Create(am map[string]interface{}) error {
  	<%- if v[:through] -%>
  		// FIXME: use transaction to create these associated objects
  		<%= v[:class_name].underscore %>_id, err := Create<%= v[:class_name] %>(am)
  		if err != nil {
  			return err
  		}
  		_, err = Create<%= v[:through].to_s.singularize.camelize %>(map[string]interface{}{"<%= model_name_underscore %>_id": var_<%= model_name_underscore %>.Id, "<%= v[:class_name].underscore %>_id": <%= v[:class_name].underscore %>_id})
  	<%- else -%>
  		<%- if v[:foreign_key] -%>
  			am["<%= v[:foreign_key] %>"] = var_<%= model_name_underscore %>.Id
  		<%- else -%>
  			am["<%= model_name_underscore %>_id"] = var_<%= model_name_underscore %>.Id
  		<%- end -%>
  		_, err := Create<%= v[:class_name] %>(am)
  	<%- end -%>
  	return err
  }
  
  func (var_<%= model_name_underscore %> *<%= @model_name %>) Get<%= v[:class_name].pluralize %>() error {
  	<%- if v[:through] -%>
  		// FIXME: use transaction to create these associated objects
  		<%= v[:class_name].underscore %>_ids, err := <%= v[:through].to_s.singularize.camelize %>IntCol("<%= v[:class_name].underscore %>_id", "<%= model_name_underscore %>_id = ?", var_<%= model_name_underscore %>.Id)
  		if err != nil {
  			return err
  		}
  		var_<%= v[:class_name].underscore.pluralize %>, err := Find<%= v[:class_name].pluralize %>(<%= v[:class_name].underscore %>_ids...)
  	<%- else -%>
  		<%- if v[:foreign_key] -%>
  			var_<%= v[:class_name].underscore.pluralize %>, err := Find<%= v[:class_name].pluralize %>By("<%= v[:foreign_key] %>", var_<%= model_name_underscore %>.Id)
  		<%- else -%>
  			var_<%= v[:class_name].underscore.pluralize %>, err := Find<%= v[:class_name].pluralize %>By("<%= model_name_underscore %>_id", var_<%= model_name_underscore %>.Id)
  		<%- end -%>
  	<%- end -%>
  	if err == nil {
  		var_<%= model_name_underscore %>.<%= k %> = var_<%= v[:class_name].underscore.pluralize %>
      }
      return err
  }
  	<%- end -%>
  <%- end -%>
  