Re: joins with DB_DataOject

From: Date: Thu, 13 Nov 2003 03:30:01 +0000
Subject: Re: joins with DB_DataOject
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8882@lists.php.net to get a copy of this message
Ian P. Christian wrote:
I'm having an issue getting joining working with DB_DataObject. I have 2 objects, DataObjects_Cart, and DataObjets_Item. These classes live in ./DataObjects/. In ./DataObjects/ I have made a 'shop.links.ini' This file contains the folowing [cart] ItemId = Item:Id
are you sure the table is not 'item', rather than 'Item' .. the error says it is looking for 'item'... Regards Alan
However, when doing this...
      $cart = new DataObjects_Cart;
      $cart->Username = Auth::getAuth();
      $item = new DataObjects_Item;
      $cart->joinAdd($item);
      $cart->find();
I get.. CONNECT NEW CONNECTION CONNECT mysql://root:<removed>@localhost/shop add909c7897b030e64d913aadb9d06e1 ERROR joinAdd: cart has no link with item __find What am I doing wrong? I have read the manual about 3 times over now, but I'm unable to figure it out. Kind Regards,
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

« previous php.pear.general (#8882) next »