Log message #3893152

# At Username Text
# Jun 13th 2016, 11:25 Anju Pareil pour mon model TypeEnvironnements
# Jun 13th 2016, 11:24 Anju Mais je ne sais pas où ça se corrige :x
# Jun 13th 2016, 11:24 Anju Ch0c4: j'ai compris d'où venait l'erreur mais je ne sais pas comment la corriger. Quand je debuge le model Environnement, j'ai ça : 'entityClass' => '\Cake\ORM\Entity', au lieu de ça : 'entityClass' => 'CentralisationUrl\Model\Entity\Environnement',
# Jun 13th 2016, 11:18 kitcat711 bon j'ai pas tout saisi
# Jun 13th 2016, 11:18 kitcat711 re
# Jun 13th 2016, 11:07 Anju Re !
# Jun 13th 2016, 10:58 Ch0c4 http://book.cakephp.org/3.0/en/orm/table-objects.html#beforesave
# Jun 13th 2016, 10:50 kitcat711 c'est bien cela?
# Jun 13th 2016, 10:50 kitcat711 dans le Model et le Controller
# Jun 13th 2016, 10:50 kitcat711 use Cake\Event\Event;
# Jun 13th 2016, 10:49 kitcat711 use Cake\ORM\Entity;
# Jun 13th 2016, 10:49 kitcat711 donc si j'ai bien compris: je mets
# Jun 13th 2016, 10:47 kitcat711 pas find
# Jun 13th 2016, 10:47 kitcat711 s13: beforsave
# Jun 13th 2016, 10:45 Ch0c4 donc enfaite le set et get et le has sont pas obligatoire
# Jun 13th 2016, 10:44 Ch0c4 extends ArrayAccess
# Jun 13th 2016, 10:44 Ch0c4 oups désolé je n'avais pas vu ça
# Jun 13th 2016, 10:44 Ch0c4 j'invente rien
# Jun 13th 2016, 10:43 kitcat711 je lis
# Jun 13th 2016, 10:43 Ch0c4 http://api.cakephp.org/3.2/class-Cake.Datasource.EntityInterface.html
# Jun 13th 2016, 10:43 Ch0c4 et pour savoir si $entity a 'username' tu peux faire un $entity->has('username');
# Jun 13th 2016, 10:42 kitcat711 tain mais j'ai jamais fait cela dans mes beforesave et j'avaais aps de warning avant
# Jun 13th 2016, 10:41 Ch0c4 et pour le modifier c'est $entity->set('userName', $entity->get('email');
# Jun 13th 2016, 10:41 Ch0c4 ensuite pour répurer le userName c'est $entity->get('username');
# Jun 13th 2016, 10:41 Ch0c4 non tu laisse le second
# Jun 13th 2016, 10:41 kitcat711 c'est vraiment pas limpide pour moi
# Jun 13th 2016, 10:40 kitcat711 et je vire l'autre?
# Jun 13th 2016, 10:40 Ch0c4 use Cake\Datasource\EntityInterface;
# Jun 13th 2016, 10:40 kitcat711 use App\Model\Entity; devient use App\Model\EntityInterface; ?
# Jun 13th 2016, 10:39 kitcat711 oui c le but
# Jun 13th 2016, 10:38 Ch0c4 le beforeSave va faire des modif avant la sauvegarde en bdd
# Jun 13th 2016, 10:36 kitcat711 du coup pour corriger je dois changer quoi
# Jun 13th 2016, 10:36 kitcat711 ben si: en prod ca s'affiche mechamment a l'écran
# Jun 13th 2016, 10:36 kitcat711 c pas clair pour moi
# Jun 13th 2016, 10:36 Ch0c4 enfaite ça change rien mais bon
# Jun 13th 2016, 10:35 Ch0c4 Entity -> EntityInterface
# Jun 13th 2016, 10:34 kitcat711 et je trouve pas -20minutes que je changed es trucs et j'ai du mettre le souk
# Jun 13th 2016, 10:33 kitcat711 un souci d'entity passé dans un before save qui n'est aps du bon type
# Jun 13th 2016, 10:33 kitcat711 http://pastie.org/private/9wnw0odymq3ui7utpge5q
# Jun 13th 2016, 10:33 kitcat711 hello
# Jun 13th 2016, 10:31 Anju Je vous dis bon appétit ! A toute !