- $this->assertEquals('one updated', MockBasicEntity::get()->addWhere('id', '=', $id1)->execute()->first()['foo']);
+ $ent1 = MockBasicEntity::get()->addWhere('id', '=', $id1)->execute()->first();
+ $this->assertEquals('one updated', $ent1['foo']);
+ $this->assertFalse(isset($ent1['group:label']));
+
+ $ent2 = MockBasicEntity::get()->addWhere('group:label', '=', 'Second')->addSelect('group:label', 'group')->execute()->first();
+ $this->assertEquals('two', $ent2['group']);
+ $this->assertEquals('Second', $ent2['group:label']);
+ // We didn't select this
+ $this->assertFalse(isset($ent2['group:name']));
+
+ // With no SELECT, all fields should be returned but not suffixy stuff like group:name
+ $ent2 = MockBasicEntity::get()->addWhere('group:label', '=', 'Second')->execute()->first();
+ $this->assertEquals('two', $ent2['group']);
+ $this->assertFalse(isset($ent2['group:name']));
+ // This one wasn't selected but did get used by the WHERE clause; ensure it isn't returned
+ $this->assertFalse(isset($ent2['group:label']));