On Wed, Jun 3, 2009 at 1:15 AM, Ian R <ianrick...@gmail.com> wrote:
>
>
> On Jun 2, 7:45 pm, brian <bally.z...@gmail.com> wrote:
>> Model::create() doesn't actually create a new DB record, it just sets
>> up the model instance. You have to use save() for that.
>>
>> What i've done in the past when moving an existing project to Cake is
>> to create a (non-cake) script that simply moves the data from one
>> database to the other, the latter DB being designed according to Cake
>> conventions.
>
>
>  Ha!  Well, that had been my original plan, and then I thought "oh,
> this is probably really easy the Cake way, and a good learning
> experience".  Well, maybe I'll go running back.  Thanks, Brian, and if
> anybody has any other thoughts, I'd be pleased to hear them!

That was what I had thought, also. Though one would have to select the
original data using query(), given the tables are unlikely to follow
Cake's conventions.

That wouldn't be such a big deal except that I also never did figure
out how to select from 2 separate DBs. Of course, I could have just
copied the old DB tables to the new, then added the Cake tables to it
and create methods to copy the data between them. But I had a few old
tables that had exactly the name I need to satisfy Cake conventions.
And then I'd still have to go in and clean out the old tables. So, in
the end, it seemed *much* simpler to just write an old-school script
to take care of this.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to