Re: How to create Meaningful Primary Keys?

From: Alessio Giovanni Baroni (alessiogiovanni.baron..mail.com)
Date: Mon Feb 02 2009 - 06:54:45 EST

  • Next message: Νίκος Παράσχου: "Re: How to create Meaningful Primary Keys?"

    When you create the mapping table->object, you must to specify "PK
    Generation Strategy" as "Custom Sequence", and you have
    control complete on keys handling. Next, in the attributes of the table and
    the relative object, you must to add the field for the primary
    key, selecting the field PK also.

    Alessio.

    2009/2/2 Νίκος Παράσχου <niparas..mail.com>

    > Hello,
    >
    > It is the first time I am using cayenne and I have some questions
    > regarding the primary keys.
    >
    > What I want to do is select some rows of a table where the PK has a
    > specific value. The problem is I can't access the PK. I can specify
    > qualifiers only with the non-PK columns. The PKs I am using have some
    > meaning (they are not just numbers) so it is very important to be able
    > to use them.
    >
    > How can I add the PK to the fields of the Object Entities?
    >
    > In this page http://cayenne.apache.org/doc20/primary-key-generation.html
    > the answer is to create a Meaningful Primary Key.
    >
    > How can I create Meaningful Primary Keys?
    >
    > Are there any security issues when using Meaningful Primary Keys?
    >
    > Thank you for your time,
    > Nikos
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Feb 02 2009 - 06:55:18 EST