Upgrade to Cake 2.9.1 breaks my Unit Tests

I have just upgraded my project to CakePHP 2.9.1 and now my unit tests have stopped passing, in many cases.

Cake in now demanding a table/fixture it never required before (in version 2.8.6 for instance). So for example a test of the function getEmailAddressByOrderID below has a fixture for the Billingprofile model/table and used to pass just fine. The find doesn’t need the order or region table so I didn’t have a fixture for either of these. Now I have Cake 2.9.1 I get an error that the orders table is missing. Sure Billingprofile is related to Order but it doesn’t need the orders table for this particular function.

What’s going on here please?

<?php class Billingprofile extends AppModel{ public $belongsTo = array( 'Order', 'Region' ); public function getEmailAddressByOrderID( $iOrderID ){ $aResult = $this->find('first', array( 'fields' => array('email'), 'conditions' => array( 'order_id' => $iOrderID ) ) );

ok, my bad. I had forgotten to copy over

class AppModel extends Model {
    var $actsAs = array('Containable');
    public $recursive = -1;

from my old project to the new one. All working now :blush: