Creating Compound PKs

From: John Armstrong (siberia..mail.com)
Date: Mon Jun 04 2007 - 02:09:50 EDT

  • Next message: Andrus Adamchik: "Re: Creating Compound PKs"

    Does Cayenne allow for the creation of a compound PK? I searched the
    archives and google more generally and could only find hints at this.
    The docs did not clarify either (although it was also hinted at. .I
    think, its a bit late :) ).

    My table looks like this:

    id
    name
    serverid
    status
    enabled

    I need to create a compound PK on name/serverid that will maintain
    uniqueness across these segments.

    My fallback is to create a validation that checks these before commit
    but my normal route in a non-ORM context is to let the DB enforce it
    and catch it there.

    Thanks!
    John-



    This archive was generated by hypermail 2.0.0 : Mon Jun 04 2007 - 02:10:20 EDT