<?php
class Entity extends AppModel {
	var $name = 'Entity';
    #var $actsAs = array('Translate' => 'name');
	 var $hasMany = array(
                'Testobjectparameter' => array(
                        'className' => 'Testobjectparameter',
                        'foreignKey' => 'entity_id'
                )

    );
 
	var $hasAndBelongsToMany = array(
		'Testobject' => array(
			'className' => 'Testobject',
			'associationForeignKey' => 'testobject_id',
			'foreign_key' => 'entity_id',
			'joinTable' => 'Testobjectparameters',
			'with' => 'Testobjectparameter'
		)
	);
 
	#var $validate = array(
	#	'name' => array(
	#		'notempty' => array(
	#			'rule' => array('notempty'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
	#		),
	#	),
	#);
}
?>
