Re: [Modeler] DbEntity:Primery Key:PK Generation Strategy - Is there any option for natural primary key?

From: Aristedes Maniatis (ar..aniatis.org)
Date: Wed Sep 09 2009 - 19:43:36 EDT

  • Next message: Nishant Neeraj: "Using Join Table"

    On 10/09/09 7:29 AM, gilbertoca wrote:
    > So, as you can see both uses natural key. When choosing DbEntity:Primery
    > Key:->"PK Generation Strategy" I can't see any option for natural key!
    > Other thing, is this one[1] the unique way to create a getter or setter for
    > primary keys in the generate Java classes? I was looking for an option on
    > ObjEntity->attributes tab->tool bar, something like "Expose Primary Key".

    I don't think using meaningful primary keys is something we want to encourage so much that we put a checkbox in the GUI for it. The alternative method of creating them is easy enough.

    You don't need a PK generation strategy since, as the page you reference states, you just need to put data in the PK field before you commit the object. It is up to you to ensure that it is unique, deal with threading and collisions.

    Ari Maniatis

    -------------------------->
    Aristedes Maniatis
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Wed Sep 09 2009 - 19:44:17 EDT