php - Uppercase related objects in CakePHP 3 -
i'm using cakephp firebird database plugin cakephp-firebird-driver, , need convert related object keys uppercase.
controller:
$this->paginate = [ 'contain' => ['fazendas'] ]; result:
{ "lotes": [ { "id": 12, "lote": "\u003c 150 kg", "faixa_inicial": "0.000000", "faixa_final": "150.000000", "fazenda_id": 5, "fazenda": { "id": 5, "nome": "fazenda 1", "logradouro": null, "inscricao_estadual": null, "cep": null, "telefone": null, "cnpj": null, "proprietario_id": null, "cidade_id": null } } } but "fazenda" keeps in lowercase.
how can this?
assuming "fazenda" association , convention in entity converted lower cased + underscored default.
example taken docs (read them!):
$this->belongsto('authors', [ 'classname' => 'publishing.authors', 'foreignkey' => 'authorid', 'propertyname' => 'person' ]);
Comments
Post a Comment