uhm... i -partially- found the solution... if i load data from Customers_Controller the order_customer::afterFind doesn't work...
On 19 Gen, 15:29, Ernesto <e.fanz...@gmail.com> wrote: > ok i found the solution > > <?php > class Recipe extends AppModel { > var $name = 'Recipe'; > var $hasAndBelongsToMany = array( > 'Tag' => > array( > 'className' => 'Tag', > 'joinTable' => 'recipes_tags', > 'with' => > '', //<---------- here it is > 'foreignKey' => 'recipe_id', > 'associationForeignKey' => 'tag_id', > 'unique' => true, > 'conditions' => '', > 'fields' => '', > 'order' => '', > 'limit' => '', > 'offset' => '', > 'finderQuery' => '', > 'deleteQuery' => '', > 'insertQuery' => '' > ) > );} > > ?> > > From the cookbook: > - with: Defines the name of the model for the join table. By default > CakePHP will auto-create a model for you. Using the example above it > would be called RecipesTag. By using this key you can override this > default name. The join table model can be used just like any "regular" > model to access the join table directly. > > On 19 Gen, 14:43, Ernesto <e.fanz...@gmail.com> wrote: > > > > > Hello. > > > i have 2 models: Customer and Order, linked together by a HABTM > > relationship that's working fine. > > the Join table (orders_customers) has the following structure: > > > order_customer_id > > customer_id > > order_id > > field_A > > field_B > > > field_A and field_B must be *100 everytime the data is loaded. > > How can i achieve 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 -~----------~----~----~----~------~----~------~--~---