@@ -84,24 +84,26 @@ where `$type` will typically be 'db', 'common' or 'object'.
8484
8585# Query methods
8686
87- The following methods are supported and will return an XML-RPC response :
87+ The following methods are supported and will return a collection :
8888
89- * search()
90- * searchRead()
91- * read()
89+ * search() - collection of integers
90+ * searchRead() - collection of models
91+ * read() - collection of models
92+ * getResourceIds - collection of integers
93+ * fieldsGet() - collection of arrays
9294
9395The following helper functions return a native PHP type insead:
9496
95- * searchArray - array
96- * searchReadArray - array
97- * readArray - array
9897* searchCount - integer
9998* getResourceId - integer
100- * getResourceIds - array
99+ * unlink - boolean
100+ * create - boolean
101101
102- (I'm torn between this approach and a more fluent approach such as
103- ` $client->firstOnly()->asArray()->read(...) ` to set the context that
104- will apply to the next command.)
102+ All ` read() ` and ` searchRead() ` methods will return a collection of models.
103+ The default model will be ` Consilience\OdooApi\Model ` , but other models can be specified.
104+ The ` odoo-api.php ` config provides an array setting to map OpenERP model names
105+ to model class names for instantiation. Further mappings can be added to the client
106+ using ` $client->addMapping('odoo.model.name', \FQDN\Class\name::class) ` .
105107
106108Note that ` searchRead ` will emulate the server's ` search_read ` for
107109Odoo versions less than 8.0 (OpenERP) but use the native ` search_read `
@@ -123,6 +125,10 @@ formats are used:
123125This makes finding help on the API difficult, since many articles
124126fail to make the OpenERP/Odoo version number clear.
125127
128+ # Setting Relationships
129+
130+ TODO (it's fairly simple once explained)
131+
126132# TODO
127133
128134* The write functions are not written yet (~~ create~~ , ~~ write~~ and unlink).
0 commit comments