Log message #3923141

# At Username Text
# Aug 25th 2016, 21:06 admad oh wait, you asked about `$_junctionProperty`
# Aug 25th 2016, 21:04 admad * junction()
# Aug 25th 2016, 21:04 admad or just `joinTable` in options
# Aug 25th 2016, 21:03 admad @nemmons you can using juntion() method
# Aug 25th 2016, 20:54 nemmons Good afternoon. Does anyone have any thoughts on why \Cake\ORM\Association\BelongsToMany.php->_options() doesn't allow for the user to set $_junctionProperty by passing in an option for it? Any reason that we shouldn't be able to edit $_junctionProperty? (https://github.com/cakephp/cakephp/blob/master/src/ORM/Association/BelongsToMany.php#L1359)
# Aug 25th 2016, 20:43 saliak my belongsToMany Products through OrderLines ?
# Aug 25th 2016, 20:42 saliak i thought the association would do that automatically?
# Aug 25th 2016, 20:41 saliak ah, shit. that did it.
# Aug 25th 2016, 20:41 btx also check your OrderLines table and make sure `product_id` actual exists
# Aug 25th 2016, 20:41 btx you should be doign something like `$this->Orders->get($id, [â??containâ??=> â??Orders.OrderLines.Productsâ??])`
# Aug 25th 2016, 20:39 saliak that error goes away if I remove Products from the contains in the Porducts->get() in my view action
# Aug 25th 2016, 20:39 btx oh I meant your php code
# Aug 25th 2016, 20:38 saliak https://gist.github.com/anonymous/2f9f1e652241c5adaf65d9d54ccf9b84
# Aug 25th 2016, 20:36 btx so what does your Query look like
# Aug 25th 2016, 20:36 saliak yes
# Aug 25th 2016, 20:35 btx Products*
# Aug 25th 2016, 20:35 btx and OrderLines belongsTo Product?
# Aug 25th 2016, 20:35 saliak yes, it does
# Aug 25th 2016, 20:34 saliak hold on
# Aug 25th 2016, 20:34 saliak oh
# Aug 25th 2016, 20:34 saliak yes
# Aug 25th 2016, 20:34 btx @saliak **
# Aug 25th 2016, 20:33 btx salik, does Orders haveMany OrderLines?
# Aug 25th 2016, 20:25 saliak OrderLines. any thoughts as to whatâ??s going on? the reason for the â??non-cake-standardâ?? names are because of some legacy action going on.
# Aug 25th 2016, 20:25 saliak Iâ??ve got a HABTM relationship between two tables, through a join table (https://gist.github.com/anonymous/7a2387f18bfa16680505ca5b8244bd39). For some reason itâ??s working one direction (products->orders), but not the other way (canâ??t get a list of products associated with an order). I get the error that â?? Unknown column 'OrderLines.product_id' in 'field listâ??â?, suggesting that cake isnâ??t using the foreign/binding key names in my definition in
# Aug 25th 2016, 20:12 hytromo Yes it is :slightly_smiling_face:
# Aug 25th 2016, 20:12 shealyw2 it should be hakermania
# Aug 25th 2016, 20:12 hakermania test: is an irc msg visible in slack
# Aug 25th 2016, 18:49 philipgrey any thoughts?
# Aug 25th 2016, 18:43 graziel nope, it gives path where data will be sent by browser so no function calling
# Aug 25th 2016, 18:39 marquesf @graziel i can call my add function in url right? :)
# Aug 25th 2016, 18:33 graziel @marquesf you can pass 'url' to Form->create ie $this->Form->create($contact, ['url' => ['controller' => 'Home', 'action' => 'contact']])
# Aug 25th 2016, 18:31 marquesf im feeling im close to do my contatc form with cells, but i dont understand how to submit my form. https://gist.github.com/anonymous/ddc7e7a0c4e95b7483520df6cdfe2e25
# Aug 25th 2016, 18:26 btx maybe Iâ??ve just been on this task too long and canâ??t think of a different way to approach things
# Aug 25th 2016, 18:25 btx weâ??re using valid property mutators to change the fields before persistence, but we have no option for changing the validator without newEntity/patchEntity
# Aug 25th 2016, 18:23 btx what if we conditionally add meta-data to an entity that only the Table needs to know about, because Controllers should be dumb, that needs to be valid in order to save, but is not part of the default validation for some reason
# Aug 25th 2016, 18:21 btx or, less destructively, `$entity->user_id = $this->AuthUser->id;`
# Aug 25th 2016, 18:20 btx @admad is there anything illegal about the following ``` $entity = $this->Foos->newEntity($this->request->data()); unset($entity->title); ```
# Aug 25th 2016, 18:12 admad You have already gone wrong when you find the need to validate an entity
# Aug 25th 2016, 18:09 btx actually. iâ??ll just slap a method on AppTable for now lol
# Aug 25th 2016, 18:09 btx `$entry = $this->patchEntity($entry, $entry->toArray(), ['validate'=>'consume']);` seems a lot to just get an entity to revalidate, but thatâ??s a struggle for another day