<?php
class ExtraGroup extends AppModel {
	var $name = 'ExtraGroup';
	var $displayField = 'name';
	var $order = array('ExtraGroup.name ASC');
	var $validate = array(
		'name' => array(
			'notempty' => array(
				'rule' => array('notempty'),
			),
			'unique' => array(
				'rule' => array('unique'),
			),
		),
	);

	var $hasAndBelongsToMany = array(
		'Product' => array(
			'className' => 'Product',
			'joinTable' => 'products_extra_groups',
			'foreignKey' => 'extra_group_id',
			'associationForeignKey' => 'product_id',
			'unique' => true,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'finderQuery' => '',
			'deleteQuery' => '',
			'insertQuery' => ''
		)
	);

}
