how easy isn't it??? But u forgot it can cause a duplicate entry of
same student_id and assessment_id which is not allowed by the table,
hence it will fail again so to clear up the mess here is an image of
relation that i m trying to say u about:

http://img212.imageshack.us/img212/8563/clipboard01nf1.jpg

now I want no duplicate entries of student_id,assessment_id.
Question is if I add an id field in table will cakePHP automatically
check and protect the duplicate of student_id, assessment_id???

Reply ASAP

On Nov 2, 5:57 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 2, 1:43 pm, maxpo <[EMAIL PROTECTED]> wrote:
>
> > My table has primary key made up of two primary keys.
> > Now when i call save it gives me the error of duplicate record, since
> > there is no column in table named id and the two id keys are :
>
> > student_id, assessment_id.
>
> > What i want from cake is to perform save operation based on these two
> > keys instead of the id field in table. (Since cake searches for the id
> > key if it is present then updates other wise simply inserts they
> > value)
>
> Add a single primary key field and your problem magically and
> mysteriously disappears.
>
> AD


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to