Hello,

I need a little help with a simple application
I am building.  I already have most of it done
except that I cannot figure out how to pass the
right "id" from one model to another.  I have
a model "vehicles" which has a hasMany relationship
with a model "vlogs".  The model "vlogs" also has a
belongsTo relationship with the model "vehicles".
When the user logs in he is taken to the vehicles
index page which lists his vehicles.  From there he can
either edit or add another vehicle but I also want him
to be able to insert a "log" for a vehicle.  Since I know
the "id" of each vehicle from this page I have a link
for each vehicle which should allow the user to add
a log to the vehicle he choses.  The "log" link from
the vehicles page has the form:
<?php echo $html->link('Add
Log',"/vlogs/add/{$vehicle['Vehicle']['id']}") ?>
and the acual link winds up having the form:
http://10.1.39.52/maxmympg/vlogs/add/4 with the "4"
being the "vehicle_id" needed for inserting into the "vlogs"
table.  The problem is that the vlogs page knows nothing
about the "4".  All of my relationships in my models and
controllers and tables is correct I believe.
How do I tell the "vlogs" model the right "vehicle_id"
top insert the record with.  What is the correct "cake"
way of doing this ??

Any help would be appreciated.

--thanx
--dusty


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

Reply via email to