<?php

class Sistema_Model_InformacoesBancariasCorretores extends Agro_Db_Table_Abstract {
	public $_insertDefaultValues = false;
	protected $_schema = 'sistema';
	protected $_name = 'informacoes_bancarias_corretores';
	protected $_primary = array('id_informacoes_bancarias', 'id_corretor');
	
	public function save(array $data) {
		$Row = $this->find($data[id_informacoes_bancarias],$data[id_corretor])->current();
		if (!$Row)
			$Row = $this->createRow();
		
		$Row->id_informacoes_bancarias = $data[id_informacoes_bancarias];
		$Row->id_corretor = $data[id_corretor];
		
		return $Row->save();
	}
}