Hi, i'm new to Cake and i have a question about synchro issue. When
you have related tables (say table B has a foreign key pointing to
table A) and you want to save 2 related tuples, it's written in Manual
that you have to

1) Save tuple in table A
2) Get last id from A
3) Save tuple in table B using that last id wich we got in step2 as a
foreign key.

Now, my question is - what happens if in the time between i save tuple
to A and get last id from A there were, like, 1000 new tuples inserted
to A? For example, i save my furst tuple in A, it has id=1. Then i try
to get this id from A, but by the time i execute this request, someone
already inserted 2 tuples into A, so i get last id equal to 3, wich
isnt what i want (i want id=1).

Is this a problem? Maybe you have some links describing this already,
i couldnt find it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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