I am new to cake.  I have two tables, customers, and balances.
balances belongsTo customers, and customers hasMany balances.
customer_id is a foreign key in the balances table.

I baked the models, and then the controller with scaffolding.
Everything worked as expected so far.

Next I baked the controller without scaffolding and with the regular
functions, index, create, etc.  Then I baked the views (saying yes to
the scaffolding option).

When I have a customer present in the database, and I go to create a
new balance for that customer, everything works as expected, and there
is a drop down menu listing the customer id's in the create new
balance form.

When I do not have any customers, and I go to create a new balance, it
shows me the labelTag "Customer", but no dropdown menu, not even an
empty one, and the selectTag IS present in the add.thtml view.  It's
not even showing an empty list.  That is problem #1.

Problem #2 is, it will let me create a new balance without supplying a
customer_id.  This is problem because I perform validation on the
customer_id field in the balances model.

'customer_id' => VALID_NUMBER,

Obviously there is a data integrity issue, but, shouldn't the save
fail because customer_id is required, despite the fact that the drop
down isn't showing up (which I am also curious about).  Thank you.


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