PHP Fatal Error: Class Not Found

Bug #262475 reported by Anthony Bush on 2008-08-29
2
Affects Status Importance Assigned to Milestone
CoughPHP
High
Anthony Bush

Bug Description

Create two tables, one with a PK, one without. Add an FK (in DB or just by using the same column name) from 2nd table to 1st. For example:

table_one
key_id PK
name

table_two
table_one_id
blah

After generating, you'll only have classes for the first table. Try to create a new "TableOne" object save it. Fatal error occurs because generator generates links to it in NotifyChildrenOfKeyChange().

Anthony Bush (awbush) on 2008-08-29
Changed in coughphp:
assignee: nobody → awbush
importance: Undecided → High
milestone: none → 1.3.1
status: New → In Progress
Anthony Bush (awbush) wrote :

This bug has existed since 1.1 (when the overhaul took place), maybe longer. It's extremely rare as it requires that you have a table without primary key AND that they be linked either by name or FK to a table that *does* have a primary key AND that you try to save a new object or change the key for an existing one (you could still update existing so long as you didn't change the primary key).

Changed in coughphp:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers