Re: Required Relations?

From: Tobias.Schoessle..nvienna.org
Date: Fri Mar 23 2007 - 16:45:04 EDT

  • Next message: Andrus Adamchik: "Summer of Code 2007"

    you do this on the database level, when creatig the tables, by defining the foreign keys to be mandatory. e.g. NOT NULL
    the exact syntax depends on your database. cayenne picks up these constraints and checks the values to be set before committing.

    Roja Buck <roj..abuck.com> wrote:
    All,
       I am a little new to databases so I apologise if this query is
    particularly incompetent. I have created a series of tables all of which are
    related to one central table with that central table having relations of one
    to many with the rest of the tables. The problem I have however is that I
    want to be able to specify which of the fields (i.e. relations) are required
    within that central table. I understand how to do this for general
    attributes within a table however I see no way to say that a relation is
    required. Am I misunderstanding this fundamentally or simply missing
    something?

    An example of this using the examples in the getting started guide would be
    adding an artist who had not yet created any paintings, or similarly a
    galley with no paintings.

    Roja

    ___
     sent via WebmailLight 3.1.11



    This archive was generated by hypermail 2.0.0 : Fri Mar 23 2007 - 16:45:33 EDT