Thanks for the reply!

1. I have a Topics table with its own unique ID. There is a Bugs table
with its own ID and the associative topic_id in it. (The bugs table
will have children later on but until I get my head around Cake I'm
trying to work with just these two tables).

2. In the Topics model I have $hasMany = array('Bugs') and in the Bugs
model I have $belongsTo = array('Topics');

Every topic ("Admission Form", "Word Export", etc.) can have many Bugs/
issues... this is why I've set it up like this.

3. I thought bake basically does the CRUD screens, nothing much more.

I'll try to do what you suggest. I had modified the View Topic code to
read:

$data = $this->Topic->find($conditions);
$this->set('topic', $data );

I guess what I can try to do is something like:

$this->set('topic', $this->paginate( $conditions ));

Still that puzzles me. If I would have 2 other related tables, how can
I make sure each table shows no more than 10 rows and each table can
paginate by itself...

Back to coding :-)

On Feb 18, 7:41 am, "mindcharger" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I see many possible problem sources here:
>
> 1) Database structure: how are you associating the topics and issues o
> the DB?
> 2) Cake Model Association: how are you telling Cake to fetch the
> results? Does each issue "belongsTo" one topic?
> 3) Bake.php: while bake.php is an amazing tool, you should always look
> critical to it...here's a fine example, you used bake.php and the
> results doesn't match what you were expecting...this is recurrent in
> code generation tools...remember: Bake.php is not the cure of all
> evil!! :-)
>
> You should definitely try to code that topic/issue by hand (don't use
> bake.php) if you are unable to solve the problem by changing DB
> structure and Cake Association Model.
>
> Try to work these points, if nothing exchanges post here the DB
> structure and the Model code and we will try to figure it out!
>
> Good luck
>
> On Feb 17, 6:41 pm, "Cynthia" <[EMAIL PROTECTED]> wrote:
>
> > I have a list of topics and each topics hasMany issues. After
> > scaffolding I have used bake.php to create the MVC's.
>
> > When I view the issues they paginate.
> > When I view the topics they paginate.
>
> > But when I view a single issue, I get this *huge* list of issues on
> > the page.
>
> > I've found one mention herehttp://tinyurl.com/2kxzmain"Pagination
> > for hasMany association" but adding var $paginate = array('limit' =>
> > 10) to both the topics and issues controllers only makes them paginate
> > correctly in their own individual view. The related info still comes
> > up as just one huge list.
>
> > I looked athttp://bakery.cakephp.org/articles/view/65andthe more
> > extendedhttp://www.noswad.me.uk/Paginationbutboth seem to deal with
> > two sets of data displayed in one and the same view (i.e.: on each
> > line you have a product, category, etc.).
>
> > Any help, link or a push in the right direct would be so helpful.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to