I am trying to create a belongsTo relationship between a products table (products) and a BrickTypes table called brick_types. My models are as follows:
class Product extends AppModel {
public $belongsTo = array( 'BrickType' );
public $hasAndBelongsToMany = array(
'colour_categories' =>
array(
'joinTable' => 'colours_products',
'foreignKey' => 'product_id',
'associationForeignKey' => 'category_id',
'with' => 'colours_products'
)
);
}
My BrickType model is as follows:
class BrickType extends AppModel {
public $name = 'BrickType';
public $useTable = 'brick_types';
public $displayField = 'type';
public $hasMany = array(
'Product' =>
array(
'className' => 'Product',
'foreignKey' => 'brick_type_id'
)
);
}
My brick_types table looks like:

And my Products table looks like:

Does anyone have any idea how I could troubleshoot this? My model will not save. I have tried saveAssociated and saveAll but have had no success.
Thanks!