Error: The constraint 'pk_customer' is being referenced by table 'customer_payment_methods', foreign key constraint 'ref_cstmr_pymnt_mthds_customer'. Could not drop constraint. See previous errors.

2 posts, 0 answers
  1. joer00
    joer00 avatar
    1 posts
    Member since:
    May 2007

    Posted 16 Nov 2010 Link to this post

    Hi,

    I have actually two separate dll's. One contains "general ERP" classes , the other those classes which are special for an industry.

    The first enhances fine, the second than throws error on VSSchema trying to updated the db:

    The constraint 'pk_customer' is being referenced by table 'customer_payment_methods', foreign key constraint 'ref_cstmr_pymnt_mthds_customer'.
    Could not drop constraint. See previous errors.

    Well, there are no previous errors reported

    Are there know issues using more than one dll, or is there anything special I have to do to updated the database ?Currently I simply enabled both projects, gave them the same database connectionID and compile one after the other.

    Joe
  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 22 Nov 2010 Link to this post

    Hello joer00,

     How are the 2 persistent models related? There seems to be a reference field between classes of the 2 models (based on the FK constraint : ref_cstmr_pymnt_mthds_customer)

    Can you run the 'Check Settings' wizard (Telerik->OpenAccess->Configuration->Check Settings menu entry) and fix any reported problems? The wizard will ensure that the right entries are made in the app.config. My guess is that the dependency between the 2 models is not set in the config file.

     If you can send us a sample project that would help in providing a solution sooner.

    All the best,
    Ady
    the Telerik team
    Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
  3. DevCraft banner
Back to Top