Trying to implement a CouchDB datasource and to closely follow the CakePHP guidelines,
I'm in a trick situation :
When saving a new record, it's required to have the fields matching the schema : https://github.com/cakephp/cakephp/blob/master/cake/libs/model/model.php#L1308
So, i put a $_schema in my model to match what i want to save.
The problem is that this schema is automatically reseted to "array()" at initialization : https://github.com/cakephp/cakephp/blob/master/cake/libs/model/model.php#L776
Even when removing the "listSources" method from my Datasource, it's still reseted because of the test "$db->isInterfaceSupported('listSources')" :
In fact my datasource extends "Datasource" (i think it's required) which have it's own "listSources" method for caching children ones.
So I would like to ask : is this Datasource->listSources method is compatible with per-Model defined schemas ? or am I doing wrong ?
--
Clément
No comments:
Post a Comment