Change in form of storage Connection Record for export and import of cases with connections to external databases.

This commit is contained in:
Hector Cortez
2011-01-24 14:20:59 +00:00
parent 1137eb1f18
commit 5f136a681e
8 changed files with 74 additions and 69 deletions

View File

@@ -827,28 +827,40 @@ abstract class BaseDbSource extends BaseObject implements Persistent {
$criteria = new Criteria(DbSourcePeer::DATABASE_NAME);
$criteria->add(DbSourcePeer::DBS_UID, $this->dbs_uid);
$criteria->add(DbSourcePeer::PRO_UID, $this->pro_uid);
return $criteria;
}
/**
* Returns the primary key for this object (row).
* @return string
* Returns the composite primary key for this object.
* The array elements will be in same order as specified in XML.
* @return array
*/
public function getPrimaryKey()
{
return $this->getDbsUid();
$pks = array();
$pks[0] = $this->getDbsUid();
$pks[1] = $this->getProUid();
return $pks;
}
/**
* Generic method to set the primary key (dbs_uid column).
* Set the [composite] primary key.
*
* @param string $key Primary key.
* @param array $keys The elements of the composite key (order must match the order in XML file).
* @return void
*/
public function setPrimaryKey($key)
public function setPrimaryKey($keys)
{
$this->setDbsUid($key);
$this->setDbsUid($keys[0]);
$this->setProUid($keys[1]);
}
/**
@@ -864,8 +876,6 @@ abstract class BaseDbSource extends BaseObject implements Persistent {
public function copyInto($copyObj, $deepCopy = false)
{
$copyObj->setProUid($this->pro_uid);
$copyObj->setDbsType($this->dbs_type);
$copyObj->setDbsServer($this->dbs_server);
@@ -885,6 +895,8 @@ abstract class BaseDbSource extends BaseObject implements Persistent {
$copyObj->setDbsUid(''); // this is a pkey column, so set to default value
$copyObj->setProUid('0'); // this is a pkey column, so set to default value
}
/**