Home » Database » DB_DataObject » Bug #6856
Don't rely on presence of database.ini
Details
| Submitted | 2006-02-21 16:00 UTC |
|---|---|
| From | phil at gyford dot com |
| Assigned | alan_k |
| Status | Closed |
| Package | DB_DataObject |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2006-02-21 16:00 UTC] phil at gyford dot com
Description:
------------
DB_DataObject::databaseStructure() relies on there being a database.ini file present. But if DataObjects are manually-created this file may not be present.
When the file is not present, doing a joinAdd() on DataObjects generates an error like this:
DataObject_MusicArtist: databaseStructure: Cant find database schema: gyford_phil/phil_music_artist in links file data: Array ( )
DataObject_MusicArtist: ERROR: Unable to load schema for database and table (turn debugging up to 5 for full error message)
Even though the DataObjects have the correct table() and keys() methods.
The databaseStructure() method should query the DataObject for the table(), keys(), links(), etc methods in order to determine if the database structure is available.
I'm filing this bug as suggested at the end of this thread:
http://beeblex.com/lists/index.php/php.pear.general/23028
Expected result:
----------------
You should be able to use joinAdd() with DataObjects that have been manually created, with correct keys() and table() methods, without the presence of a database.ini method.
Actual result:
--------------
DataObject_MusicArtist: databaseStructure: Cant find database schema: gyford_phil/phil_music_artist in links file data: Array ( )
DataObject_MusicArtist: ERROR: Unable to load schema for database and table (turn debugging up to 5 for full error message)
[2006-02-23 08:52 UTC] phil at gyford dot com
Yes, that seems to fix the problem. Thanks!
(I'm not sure if it's up to me to close the bug or not?)