Thanks for your reply. I am aware of the behaviour you describe. However, as you can see in the code snippet, I'm not using paginate.
On 24 July, 18:53, "Dr. Loboto" <[email protected]> wrote: > Unbind works only for one next query. Paginated query consist of 2 > ones - first "count" and second "all". So ordinal unbind will force > execute "count" query without BasketItems but for "all" query it'll > rebind BasketItems again. > > On Jul 23, 3:26 pm, lazlo2019 <[email protected]> wrote: > > > > > Hi > > > I'm trying useunbindModel() as per below inside a Basket model (which > > hasMany BasketItem) > > > $this->unbindModel(array('hasMany' => array('BasketItem'))); > > return $this->find('first', array('conditions' => array( > > 'Basket.id' => $this->_getBasketID() > > ))); > > > The result of the find() I would not expect to include BasketItems. > > However, it does. When passing false as the final argument it does > > work correctly and does not return BasketItems. However, in this case > > I do not want the unbind to persist. As far as I can see, given the > > find is immediately after the unbind, the persist => false argument > > should not be required. > > > Can anyone reproduce this before I add a ticket? > > > Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
