if you are talking about different tables in the same database you can do something like this:
if you want to change the table in every model with the same prefix
in the app_Model
function __construct($id = false, $table = null, $ds = null) {
$prefix = getPrefix();
$this->useTable = $prefix.$useTable;
parent::__construct($id,$table,$ds);
}
Like this it wiil change every model table before using it.... if you want only the model client to be modified just put this same function in the client model, if you want a couple do the same in this models. If you want all except one do it in app_model like this
function __construct($id = false, $table = null, $ds = null) {
$prefix = getPrefix();
if ($this->name != 'Client')
$this->useTable = $prefix.$useTable;
parent::__construct($id,$table,$ds);
}
this is not a behavior though but it solves your problem :S if you want to do it in a bahaviour you will need to do something similar using beforeFind, beforeSave, etc (all the befores doing something in the database) or do it when loading a model (in a controller it will be like this $this->Client->useTable = $prefix.$this->Client->useTable;)
Remember that getPrefix() function is the function that you will have that tells you which prefix to use.
I think you have to always write the var $useTable = 'table'; for this to work.
If you want different databases try this solution post in the bakery