summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign/RelationTableView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/relationdesign/RelationTableView.cxx')
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index e14c234cc5d3..0c9d0cc1a456 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -225,9 +225,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
::rtl::OUString sDestFieldName = jxdDest.pListBox->GetEntryText(jxdDest.pEntry);
// die Anzahl der PKey-Felder in der Quelle
-
- ::std::vector< Reference< XNameAccess> > aPkeys = ::dbaui::getKeyColumns(pSourceWin->GetData()->getKeys(),KeyType::PRIMARY);
- bool bAskUser = aPkeys.size() == 1 && Reference< XIndexAccess>(aPkeys[0],UNO_QUERY)->getCount() > 1;
+ const Reference< XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(pSourceWin->GetData()->getTable());
+ bool bAskUser = xPrimaryKeyColumns.is() && Reference< XIndexAccess>(xPrimaryKeyColumns,UNO_QUERY)->getCount() > 1;
pTabConnData->SetConnLine( 0, sSourceFieldName, sDestFieldName );