Re: Getting an error whenever I use DB_DataObject::joinAdd()
| From: | Justin Patrin | Date: | Fri, 17 Feb 2006 15:39:04 +0000 |
| Subject: | Re: Getting an error whenever I use DB_DataObject::joinAdd() | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23034@lists.php.net to get a copy of this message | ||
On 2/17/06, Phil Gyford <gyford@gmail.com> wrote:
> Hi,
>
> I recently upgraded my DB_DataObject from a pre v1.80 to v1.82.
>
> On two sites I now get a fatal error when I call DB_DataObject::joinAdd():
>
> *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)
>
> I can't see why this is... joinAdd() ends up calling
> DB_DataObject::databaseStructure() and it seems like the database structure
> can't be found/created for this object, which is odd when it works fine for
> all other, non-joined objects. I'm using a database.links.ini file but not a
> database.ini file - the structures are defined in the objects themselves.
>
> If I just stick in "return true;" after line 1779 ("- if not try building
> it..") then the site works as expected. Obviously, this isn't a solution,
> but I can't see what I've done wrong that is causing it to fall over at this
> point.
>
> I'm not sure what else to say that could help someone help me - do ask if I
> can provide further information that would be useful.
>
This is a problem that is also being talked about in another thread
right now (ar at least was lately). DB_DO shouldn't rely on
database.ini files, it should always only call table(), keys(),
links(), etc. on the DO to get the required information (I've pushed
for this in the past too). Please file a bug report.
--
Justin Patrin