diff options
Diffstat (limited to 'dbaccess/source/ui/relationdesign/RTableConnectionData.cxx')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index 2fb7c0b821..9651a89c9f 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -256,7 +256,8 @@ bool ORelationTableConnectionData::Update() xKey->setPropertyValue(PROPERTY_NAME,Any(sKeyName)); xKey->setPropertyValue(PROPERTY_TYPE,Any(KeyType::FOREIGN)); - xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetTableName())); + // get the full name of the tables to ensure uniqueness across catalogs and schema + xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetComposedName())); xKey->setPropertyValue(PROPERTY_UPDATERULE, Any(GetUpdateRules())); xKey->setPropertyValue(PROPERTY_DELETERULE, Any(GetDeleteRules())); } @@ -301,7 +302,7 @@ bool ORelationTableConnectionData::Update() { OUString sReferencedTable; xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable; - if ( sReferencedTable == getReferencedTable()->GetTableName() ) + if ( sReferencedTable == getReferencedTable()->GetComposedName() ) { xColSup.set(xKey,UNO_QUERY_THROW); try |