Log message #3928131

# At Username Text
# Sep 6th 2016, 16:20 s13 oui avec le boyton tu peux faire un appel ajax et c'est réglé
# Sep 6th 2016, 16:20 SpoutBE ça à l'avantage de pas deleter direct (misclick)
# Sep 6th 2016, 16:20 SpoutBE checkbox à cocher pr delete
# Sep 6th 2016, 16:20 SpoutBE Bon ben tant pis je laisse ça aussi alors
# Sep 6th 2016, 16:19 SpoutBE lol comme moi :D
# Sep 6th 2016, 16:19 SpoutBE truc de moule quoi :D
# Sep 6th 2016, 16:19 s13 https://gist.github.com/orgasmicnightmare/e1f3dc16caf53b552e3b57965efef05d
# Sep 6th 2016, 16:19 SpoutBE et $(this).closest('fieldset').remove();
# Sep 6th 2016, 16:19 SpoutBE c'est juste qu'en général je met un <button type="button" class="btn btn-danger delete"><?php echo __("Delete"); ?></button>
# Sep 6th 2016, 16:18 SpoutBE Bon sinon tant pis je vais rester avec mon delete à la mano
# Sep 6th 2016, 16:18 SpoutBE c'est pas Menu que je supprime
# Sep 6th 2016, 16:17 SpoutBE aucun cascade à faire
# Sep 6th 2016, 16:17 SpoutBE oui donc c'est ce que je dis, rien à voir avec dependant
# Sep 6th 2016, 16:17 s13 il fait patchEntity($entity, data)
# Sep 6th 2016, 16:17 s13 oui mais c'est pareil
# Sep 6th 2016, 16:16 SpoutBE ben je fais rien, c'est Crud qui fait tout :D
# Sep 6th 2016, 16:16 s13 J'ai fait un truc similiaire avec un flag "delete" sur l'enfant
# Sep 6th 2016, 16:16 SpoutBE sur MenuItemsTable
# Sep 6th 2016, 16:16 s13 Le pb vient du fait que tu fais surement un patchEntity() avedc les données de ton form, mais pour lui c'est comme si tu n'avais rien fait.
# Sep 6th 2016, 16:16 SpoutBE }
# Sep 6th 2016, 16:16 SpoutBE }
# Sep 6th 2016, 16:16 SpoutBE $this->delete($entity);
# Sep 6th 2016, 16:16 SpoutBE if (!empty($entity->delete)) {
# Sep 6th 2016, 16:16 SpoutBE {
# Sep 6th 2016, 16:16 SpoutBE public function afterSave(Event $event, EntityInterface $entity, ArrayObject $options)
# Sep 6th 2016, 16:16 SpoutBE j'ai émulé moi même ce fonctionnement avec:
# Sep 6th 2016, 16:16 SpoutBE je veux supprimer la row
# Sep 6th 2016, 16:15 SpoutBE Ben je veux pas le nuller ces ça le prob
# Sep 6th 2016, 16:14 SpoutBE le genre de truc que j'ai déjà fait plein de fois en cake 1 et 2
# Sep 6th 2016, 16:14 SpoutBE pas nullable non
# Sep 6th 2016, 16:13 SpoutBE Ou alors y'a un autre tuc à faire, genre setter le menu_id à NULL pr qu'il le fasse ?
# Sep 6th 2016, 16:12 SpoutBE oui
# Sep 6th 2016, 16:10 SpoutBE ]);
# Sep 6th 2016, 16:10 SpoutBE 'saveStrategy' => 'replace'
# Sep 6th 2016, 16:10 SpoutBE $this->hasMany('MenuItems', [
# Sep 6th 2016, 16:10 SpoutBE vidé le cache, non tjs pas
# Sep 6th 2016, 16:09 SpoutBE Heu non j'vais tester j'pensais pas que là aussi caché
# Sep 6th 2016, 16:09 SpoutBE Oui j'ai testé, marche pas
# Sep 6th 2016, 16:09 SpoutBE Et là: http://book.cakephp.org/3.0/en/orm/saving-data.html#saving-hasmany-associations
# Sep 6th 2016, 16:08 SpoutBE Ils en parlent là: http://book.cakephp.org/3.0/en/orm/associations.html#hasmany-associations
# Sep 6th 2016, 16:06 SpoutBE Un peu genre: Articles et Comments