<?php
class CurrentStock extends AppModel
{
 var $name = 'CurrentStock';

 var $belongsTo = array(
  'Brand' => array(
   'className' => 'Brand',
   'foreignKey' => 'brand_id'
  )
 ); 
	function getStockStatus($entity, $entity_id){
		$stocks = $this->find('all', array('conditions'=>array('CurrentStock.entity_id'=>$entity_id, 'CurrentStock.entity' => $entity) ));
		return $stocks;
	}
}