Did you ever find a solution to this? I too am confused... :-S
On Jul 6, 10:18 am, pt <google-acco...@q.eiox.com> wrote:
> Hello,
> I'm having an issue baking when specifying associations with legacy
> table names. Fixtures seem to ignore the specified table name.
> Couldn't find anything in groups or bug tracker. Is there something
> I'm doing wrong?
>
> I know the table names and all don't make sense, but this is from a
> legacy app. I tried it with and without simpletest installed, same
> thing.
>
> Thanks.
>
> Cake 1.3.2
>
> ---- Cake bake output ---
> ...
> Would you like to define some additional model associations? (y/n)
> [n] > y
> What is the association type?
> 1. belongsTo
> 2. hasOne
> 3. hasMany
> 4. hasAndBelongsToMany
> Enter a number> 3
>
> For the following options be very careful to match your setup exactly.
> Any spelling mistakes will cause errors.
> ---------------------------------------------------------------
> What is the alias for this association?> Lead
>
> What className will Lead use?
> [Lead] >
> What is the table for this model?> Lead
>
> A helpful List of possible keys
> ...<snip>Long list of fields...
> What is the foreignKey?> 10
>
> Define another association? (y/n)
> [y] > n
>
> ---------------------------------------------------------------
> The following Model will be created:
> ---------------------------------------------------------------
> Name: Activity
> DB Table: [Activity]
> Primary Key: nActivityPk
> Associations:
> Activity hasMany Lead
> ---------------------------------------------------------------
> Look okay? (y/n)
> [y] >
>
> Baking model class for Activity...
>
> Creating file /home/p/public_html/spnew/app/models/activity.php
> Wrote `/home/p/public_html/spnew/app/models/activity.php`
> SimpleTest is not installed. Do you want to bake unit test files
> anyway? (y/n)
> [y] >
>
> You can download SimpleTest fromhttp://simpletest.org
>
> Baking test fixture for Activity...
>
> Creating file /home/p/public_html/spnew/app/tests/fixtures/
> activity_fixture.php
> Wrote `/home/p/public_html/spnew/app/tests/fixtures/
> activity_fixture.php`
> Bake is detecting possible fixtures..
> Error: Missing database table 'leads' for model 'Lead'
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment