Skip to content

Import from DB fails with a InsDuplicatedRelationship error. #2074

Description

@martins-spektors

Bug description
Import from DB fails with a InsDuplicatedRelationship error.

How to reproduce
Create a DB with the schema containing table inheritance (see attached zip). Try to import into PgModeler.

Expected behavior
Importing model from database succeeds.

Info about your desktop

  • OS: Windows
  • Version: 11
  • Window manager: Windows Explorer
  • pgModeler version: 1.2.3
  • Qt version: 6.9.2

Screenshot

Image

Stacktrace / Debug info


[0] src/tools/databaseimportform.cpp (658)
  void DatabaseImportForm::captureThreadError(Exception)
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

[1] src/tools/databaseimporthelper.cpp (723)
  void DatabaseImportHelper::importDatabase()
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

[2] src/tools/databaseimporthelper.cpp (2842)
  void DatabaseImportHelper::createTableInheritances()
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

[3] src/tools/databaseimporthelper.cpp (3320)
  void DatabaseImportHelper::__createTableInheritances()
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

[4] src/databasemodel.cpp (2428)
  void DatabaseModel::addRelationship(BaseRelationship *, int)
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

[5] src/databasemodel.cpp (2400)
  void DatabaseModel::addRelationship(BaseRelationship *, int)
    [InsDuplicatedRelationship] There is already a relationship between 'ppps.postpaid_notice_payments' (Table) and 'ppps.versions' (Table) in the model! When using relationships of the type generalization, copy and one-to-one there can't be other relationships linked to the pair of tables.

Additional info

schema-sql.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions