I am working on a datasource for amazon SDB, and since it's a
schemaless database I have overriden the hasField methodi my models to
just return alway true, this is how my model looks like:

class User extends AppModel {
        var $useDbConfig='sdb';
        //var $recursive=-1;
        var $ConsistentRead=true;

        var $hasMany=array('Post');

        function hasField($name, $checkVirtual = false) {
                return true;
        }
}

Also I have some members (as for instance the ConsistentRead) to store
per model default values that are used in the datasource.

Now the idea is, should I subclass AppModeland create for instance
sdbModel, and then make my models extend sdbModel? in a project with
lots of models it will be tedious to change all of them. Is there a
better way to handle it? plugins?behaviours?

BTW, it already does finds with conditions, saving and reading
records, updates and also handles hasMany relations. Performance is
not very good probably due to the fact that I am developing from a
server outside of the Amazon network, but is better than I expected.

I would like to share my work, is there a cake repository where I can
upload it or should I create my own repo?

Regards David






-- 
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