Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.0
-
Fix Version/s: None
-
Component/s: Pager
-
Labels:None
-
Environment:Debian testing squeeze 32 bit.
Description
When I use the same procedure without Doctrine_Pager everything works fine, with Doctrine_Pager the behavior of later queries is strange. Example:
----------------WORKING:
1. I fetch list
Doctrine_Query::create()>select('z.,s.,o.*,u.jmeno as Vložil,k.nazev_cs as Kategorie')>from('ShopZbozi z,z.Obrazek o,z.Soubor s,z.Uzivatel u,z.ShopKategorie k')>orderby('z.nazev_cs ASC')>fetchArray();
2. I fetch a row to edit independently on the list above
$object = Doctrine::getTable('ShopZbozi')->find(123);
3. edit properties of the object...
4. $object->replace();
the object is fetched with no related objects like [Uzivatel] or [Soubor], so when I change for example $object->iduzivatel (related Uzivatel object id) and save it is OK
----------------BROKEN:
1. I fetch list in Pager
new Doctrine_Pager(Doctrine_Query::create()>select('z.,s.,o.*,u.jmeno as Vložil,k.nazev_cs as Kategorie')>from('ShopZbozi z,z.Obrazek o,z.Soubor s,z.Uzivatel u,z.ShopKategorie k')>orderby('z.nazev_cs ASC'),$this>page,$this->perpage);
2. I fetch a row to edit independently on the list above (in contrast to the first working example this $object is fetched with EMPTY RELATION OBJECTS, which causes inserting empty new rows when calling ->replace())
$object = Doctrine::getTable('ShopZbozi')->find(123);
3. edit properties of the object...
4. $object->replace();
-> the $object has all the related object fetched as it was defined in the list in Pager - like it was used as a template for getTable and when ->replace() - new empty related objects are inserted in DB.
I've been using Doctrine for I guess 2 years now and I believe this bug/strange behavior has always been there.
Maybe I'm wrong and it is not a bug, but the behavior is strange and it took me really long to find where the problem is and I still don't know how to use pager without influencing the later queries.
Thanx John Mathew
Activity
| Field | Original Value | New Value |
|---|---|---|
| Summary | Doctrine_Pager query "infuences" Doctrine::getTable() query | Doctrine_Pager query "influences" Doctrine::getTable() query |
- Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DC-312, expand=changesets[-21:-1].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)