/** * Convert to JSON ready array. Camel case fields and the primary key is always mapped to 'id' * @return array */ public function toJSON() { $json = parent::toJSON(); $json['id'] = $this->getId(); return $json; }