cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Huss <>
Subject Re: Cayenne with JSF 2
Date Tue, 03 Apr 2012 14:10:39 GMT
On Tue, Apr 3, 2012 at 5:23 AM, yunus <> 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.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message