cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Required Relations?
Date Fri, 23 Mar 2007 20:45:04 GMT
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 <> wrote:
   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

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.


 sent via WebmailLight 3.1.11

View raw message