Hi all,

I've been making some changes to a project I'm developing and I have a model as follows:
PHP Code:
 * The projectlink model represents the link Project HABTM Project.
 * Because of the complexity of this relationship there are two relationships: Project HABTM Parent(Project) and Project HABTM Child(Project).

class ProjectLink extends AppModel {
$name "ProjectLink";
$actsAs = array("Containable");
$belongsTo = array(
"Parent"    =>    array(
"className"        =>    "Project",
"foreignKey"    =>    "from_project_id"
"Child"        =>    array(
"className"        =>    "Project",
"foreignKey"    =>    "to_project_id"

It's been working for at least a few months but now when I go to any of the actions relating to this model I get the following from xdebug:

Fatal error: Maximum function nesting level of '100' reached, aborting! in /Users/gid/Sites/primary-energy-research/cake/libs/debugger.php on line 248
The following function cycle is getting repeated over and over again (and the cycles are nested inside each other):
  1. ClassRegistry->init( )
  2. Model->__construct( )
  3. Model->__createLinks( )
  4. Model->__constructLinkedModel( )

So it looks like the relationships are going round in a spiral until it hits:
  1. ClassRegistry->init( )
  2. ClassRegistry->__duplicate( )
  3. ClassRegistry->isKeySet( )
  4. Debugger->handleError( )

Unfortunately after that it's got to 100 nested functions so it bails.

Any ideas guys?