cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: PK Column - Cayenne Modeler
Date Sat, 22 Jul 2006 17:23:41 GMT
BTW, I suggest an upgrade to Cayenne 1.2 final - it has some Modeler  
glitches fixed.

Andrus

On Jul 22, 2006, at 11:46 AM, Rashid Khan wrote:

> Thanks for the explanation, Michael.
>
> On 7/22/06, Michael Gentry <blacknext@gmail.com> wrote:
>> For Report, you want report_id set as PK (I think this automatically
>> checks Mandatory, too, since a PK must be mandatory).  For Schedule,
>> you want schedule_id set as PK.  You don't mark FKs as a PK, but if
>> the Report must belong to a Schedule, I'd mark Report's  
>> schedule_id as
>> mandatory.  If this is the case, you may also want to set up a  
>> cascade
>> delete rule from Schedule -> Report to automatically delete all
>> Reports when you delete a Schedule.  (The delete rule for
>> Report->Schedule would be no action.)
>>
>> /dev/mrg
>>
>> On 7/22/06, Rashid Khan <rashidk3@gmail.com> wrote:
>> > Hi,
>> >
>> > I am using cayenne-1.2RC1. I want to know in what kind of situation
>> > the PK column in the modeler has to be checked.
>> >
>> > Let's say I have the following setup.
>> >
>> > 1. Report Table with columns: report_id, report_name, schedule_id.
>> > (where schedule_id is a foreign key)
>> >
>> > 2. Schedule Table with columns: schedule_id, schedule_desc.
>> >
>> > Report >- Schedule (Many-to-one relationship)
>> >
>> > The modeler automatically checks the PK column for report_id. I am
>> > confused whether to make the PK checked for schedule_id as well in
>> > report db entity.
>> >
>> > I hope my question is clear.
>> >
>> > Thanks,
>> >
>> > Rashid Khan
>> >
>>
>


Mime
View raw message