Model have schema() method which call describe() method of data source
if supported. For manual per-model schemas you can override its
schema() method. For datasource-managed schemas you should take a look
into its describe() method.

On 29 мар, 03:50, Clément Hallet <[email protected]> wrote:
> Hello CakePHP,
>
> 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....
> 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....
>
> 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

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to