Ticket #821 (closed defect: fixed)
Query copy : clone doesn't works correctly
| Reported by: | cferry | Owned by: | zYne- |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.10.3 |
| Component: | Query/Hydration | Version: | 0.10.0 |
| Severity: | Keywords: | ||
| Cc: | Has Test: | ||
| Status: | Has Patch: |
Description
Hi !
Juste updated to 10.2 but it seems a problem in Query::copy.
The new "clone" doesn't works correctly because, it copy alias list, and when i try to getSql, or execute, i get this error :
Duplicate alias n in query.
$query->select('n.*')->from('NewsRecord n');
$query2 = $query->copy();
$this->data = $query->execute();
$query2->limit(0);
$query2->offset(0);
$query2->select('COUNT(n.id) as nb');
echo $query2->getSql(); // <- throw Exception.
Change History
Note: See
TracTickets for help on using
tickets.