Re: [JIRA] Created: (CAY-987) Specifying PK when creating a new object in DB generated PK mode

From: Michael Gentry (blacknex..mail.com)
Date: Tue Feb 19 2008 - 15:38:48 EST

  • Next message: Scott Anderson (JIRA): "[JIRA] Commented: (CAY-942) Generic types"

    Are you asking if you can specify/assign your own PKs? If so, the
    answer is yes. You should expose the PK attribute in the ObjEntity in
    CayenneModeler (this isn't done by default). Then when you generate
    the code, it'll include a getter/setter for the PK. If you assign the
    PK manually for a new object, it will not try to generate one.

    /dev/mrg

    On Feb 19, 2008 3:15 PM, Scott Anderson (JIRA) <de..ayenne.apache.org> wrote:
    > Specifying PK when creating a new object in DB generated PK mode
    > ----------------------------------------------------------------
    >
    > Key: CAY-987
    > URL: https://issues.apache.org/cayenne/browse/CAY-987
    > Project: Cayenne
    > Issue Type: Improvement
    > Components: Cayenne Core Library
    > Environment: N/A
    > Reporter: Scott Anderson
    > Assignee: Andrus Adamchik
    > Priority: Minor
    >
    >
    > I am working an a request ticket system, similar to the one I'm using to enter this issue. I need to import requests from the old schema to the new schema, and the PKs must be specified while doing an import. When using the tool normally, the PKs must be database generated. Is there any way to do this?
    >
    > --
    > This message is automatically generated by JIRA.
    > -
    > You can reply to this email to add a comment to the issue online.
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Feb 19 2008 - 15:39:25 EST