could you post your Entry & EntryType model? On 16 jan, 15:21, Rob Wilkerson <[email protected]> wrote: > I'm trying to use save() to update model data after submitting an edit > form and the resulting SQL is missing any reference to a foreign key > association. The "core" data updates fine, but if I change the foreign > key data, the change is ignored. > > I have an Entry model that belongsTo an EntryType model. The problem, > I think, is that the primary key on the entry_types table does not > follow the Cake convention - it's a varchar(255). What I'm finding is > that the form populates fine and the data is posted properly (all > properties, including the EntryType id) is available in $this->data, > but the SQL generated by my save() call is: > > UPDATE `entries` SET `title` = 'The Dedication', `description` = > 'Nominate someone to be the recipient of a dedication.' WHERE > `entries`.`id` = '49611aca-07f0-4891-872d-4df5c0a80232' > > Note that the entry_type_id is not being updated at all. Is that > simply because it's non-standard? If so, what's the best way to adjust > for that? Use query()? > > Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
