Open mrVrAlex opened 8 years ago
Hi, Guys! I want propose make for all extra_lazy associations, something like this:
$sql = 'SELECT indexBy FROM ' . $quotedJoinTable . ' WHERE ' . implode(' AND ', $whereClauses); return (array) $this->conn->fetchColumn($sql, $params, 0, $types);
This should return an array IDs by simple SQL instead loop (and hydrate!) all collection.
Makes sense, although I've avoided keyed-collections because AFAIK when you update items (or flush them to get an auto-generated ID) the association-keys may be stale or inconsistent.
Hi, Guys! I want propose make for all extra_lazy associations, something like this:
This should return an array IDs by simple SQL instead loop (and hydrate!) all collection.