On Tue, Apr 3, 2012 at 5:23 AM, yunus <coolyunus1...@gmail.com> wrote:

> hi Andrus,
> I have two queries related to cayenne-
>
> 1- I have a table "registration" in which there is a primary key
> "EnrolmentId" which is autogenerated after successfully registration. Other
> attributes are "Name" and "PAN ID".(PAN ID can belong to more than one
> member of a family).So i want to know how i can find that a person cannot
> register more than once.I want to find through combined search of (Name &
> PAN ID) but these are not composite key as Enrolment id is already a
> primary
> key.Now can you tell me how it can be done using Cayenne.
>

You do this by adding a UNIQUE constraint to your database for these
columns.  That is the only way to truly enforce it.

John

Reply via email to