thanx buddy will surely lookup for them :P Thanx once again :D
On Nov 3, 3:27 pm, AD7six <[EMAIL PROTECTED]> wrote: > On Nov 3, 8:20 am, maxpo <[EMAIL PROTECTED]> wrote: > > > 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 > > Yessir! Sorry I obviously forgot something. You see with a pk > correctly defined YOU would need to THINK about handling your unique > constraint YOURSELF - It's a bit obvious, isn't it (???). Obviously > it's really urgent, so urgent that the search of the group for other > threads on compound primary keys seems to have been completely missed. > Don't worry though, you can do that search now, and probably look at > the api regarding validation in general/beforeValidate/beforeSave and > how to put in place a unique constraint at the same time. > > hth, > > 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 -~----------~----~----~----~------~----~------~--~---
