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)

On Nov 2, 4:31 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Please explain what you want to achieve more clearly.
>
> But perhaps the beforeSave() model callback is what you are after?
> Then you can modify the data that is about to be saved in any way you
> like.
>
> On Nov 2, 7:45 pm, maxpo <[EMAIL PROTECTED]> wrote:
>
> > How can assign custom id fields to model, so that whenever i call save
> > it should reffer to those id fields before inserting.
> > I know var $id is there in models but how to use it?


--~--~---------~--~----~------------~-------~--~----~
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