Cayenne not taking account of PKs created by external SQL script

From: Rashid Khan (rashidk..mail.com)
Date: Thu Oct 19 2006 - 05:17:02 EDT

  • Next message: Tore Halset: "Re: Cayenne not taking account of PKs created by external SQL script"

    Hi all,

    I am using cayenne-1.2. I have noticed that when I add a new record manually
    (using sql script) in my database, cayenne does not take into account the
    primary key of that record. Let me explain this by giving an example.

    Let's say I _manually_ created the following record in my report table which
    has two columns: report_id and name.

    report_id | name
    ---------------- --------------
    200 | report1

    Now when I use cayenne to insert a new report, I get an exception saying
    "duplicate key".

    Is there any way I can make cayenne aware of the records that have been
    created manually? Or better yet, can I get rid of Cayenne Auto PK support
    completely?

    Any ideas will be appreciated.

    Thanks,

    Rashid



    This archive was generated by hypermail 2.0.0 : Thu Oct 19 2006 - 05:17:37 EDT