Re: Customizing relations

2007-11-21 Thread BoSc

unbindModel lets me terminate a relationship between tables, this
does not let me choose the level of recursion on a model to model
basis. I will have a look at the expects behaviour.

On 20 nov, 17:46, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 What you need is unbindModel (see models section in the manual), or
 the expects behaviour (see the bakery)

 Simon

 BoSc wrote:
  Hi,

  Just a simple problem, I have one central table (model) that has a lot
  of relationships with other tables. The problem is, for one view I
  need to get 3 levels of hierarchy (recursive) to be able to get to
  specific data, but only for one specific direction. Since the table is
  connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
  in all the directions causing major overhead. I know that I can cut
  loose some associations, but this is not the way since I do need the
  other data be it in not so many levels of hierarchy.

  Now I came up with a possible solution but I thought there could be
  some more acceptable way in achieving this:

  - just findAll() using 1/2 levels of hierarchy and query the remaning
  information.
  - Also I was wondering if there is some way to include the fields that
  need to be fetched for certain relationships, when a book is connected
  to an author, when querying all the books I might only be interested
  in the author's name and not in the address (for instance)

  Any help on this in really appreciated.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Customizing relations

2007-11-21 Thread BoSc

It is a but of a hassle with the expects behaviour (a bit hard to
understand the logic at some times), but I've managed fixing my
problem (reduced the result set to a marginal factor of the original).

On 20 nov, 17:46, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 What you need is unbindModel (see models section in the manual), or
 the expects behaviour (see the bakery)

 Simon

 BoSc wrote:
  Hi,

  Just a simple problem, I have one central table (model) that has a lot
  of relationships with other tables. The problem is, for one view I
  need to get 3 levels of hierarchy (recursive) to be able to get to
  specific data, but only for one specific direction. Since the table is
  connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
  in all the directions causing major overhead. I know that I can cut
  loose some associations, but this is not the way since I do need the
  other data be it in not so many levels of hierarchy.

  Now I came up with a possible solution but I thought there could be
  some more acceptable way in achieving this:

  - just findAll() using 1/2 levels of hierarchy and query the remaning
  information.
  - Also I was wondering if there is some way to include the fields that
  need to be fetched for certain relationships, when a book is connected
  to an author, when querying all the books I might only be interested
  in the author's name and not in the address (for instance)

  Any help on this in really appreciated.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Customizing relations

2007-11-21 Thread rvntone

how you fixed?

On Nov 21, 4:39 am, BoSc [EMAIL PROTECTED] wrote:
 It is a but of a hassle with the expects behaviour (a bit hard to
 understand the logic at some times), but I've managed fixing my
 problem (reduced the result set to a marginal factor of the original).

 On 20 nov, 17:46, [EMAIL PROTECTED]

 [EMAIL PROTECTED] wrote:
  What you need is unbindModel (see models section in the manual), or
  the expects behaviour (see the bakery)

  Simon

  BoSc wrote:
   Hi,

   Just a simple problem, I have one central table (model) that has a lot
   of relationships with other tables. The problem is, for one view I
   need to get 3 levels of hierarchy (recursive) to be able to get to
   specific data, but only for one specific direction. Since the table is
   connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
   in all the directions causing major overhead. I know that I can cut
   loose some associations, but this is not the way since I do need the
   other data be it in not so many levels of hierarchy.

   Now I came up with a possible solution but I thought there could be
   some more acceptable way in achieving this:

   - just findAll() using 1/2 levels of hierarchy and query the remaning
   information.
   - Also I was wondering if there is some way to include the fields that
   need to be fetched for certain relationships, when a book is connected
   to an author, when querying all the books I might only be interested
   in the author's name and not in the address (for instance)

   Any help on this in really appreciated.

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



Re: Customizing relations

2007-11-20 Thread [EMAIL PROTECTED]

What you need is unbindModel (see models section in the manual), or
the expects behaviour (see the bakery)

Simon

BoSc wrote:
 Hi,

 Just a simple problem, I have one central table (model) that has a lot
 of relationships with other tables. The problem is, for one view I
 need to get 3 levels of hierarchy (recursive) to be able to get to
 specific data, but only for one specific direction. Since the table is
 connected to 5 other tables, Cake tries to fetch 3 levels of hierarchy
 in all the directions causing major overhead. I know that I can cut
 loose some associations, but this is not the way since I do need the
 other data be it in not so many levels of hierarchy.

 Now I came up with a possible solution but I thought there could be
 some more acceptable way in achieving this:

 - just findAll() using 1/2 levels of hierarchy and query the remaning
 information.
 - Also I was wondering if there is some way to include the fields that
 need to be fetched for certain relationships, when a book is connected
 to an author, when querying all the books I might only be interested
 in the author's name and not in the address (for instance)

 Any help on this in really appreciated.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---