[turba] Be able to specify primary key when adding new object.

Matthieu Foillard mgf at iota-online.com
Thu Apr 24 13:20:55 PDT 2003


Hi,

In turba CVS, i defined a data source like this : 

$cfgSources['products'] = array(
    'title' => _("Products"),
    'type' => 'sql',
    'params' => array(
        'phptype' => 'oci8',
        'hostspec' => 'PWS',
        'username' => 'photo',
        'password' => 'xxxx',
        'database' => 'PWS',
        'table' => 'produit',
        'charset' => 'iso-8859-1'
    ),
    'map' => array(
        '__key' => 'ID_PRODUIT',
        'id_produit' => 'ID_PRODUIT',
	...
	...

I want to be able to enter my own key when adding new objet to this source.
But the form does not display such field (id_produit) so that it tries to add 
its own generated id when inserting data resulting in an error.

Is there a way to do that ?

Thanks all.

mgf


More information about the turba mailing list