IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Symfony PHP Discussion :

Class timestamp does not exist 500 Internal Server Error - ReflectionException [2.x]


Sujet :

Symfony PHP

  1. #1
    Membre régulier
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    155
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 155
    Points : 76
    Points
    76
    Par défaut Class timestamp does not exist 500 Internal Server Error - ReflectionException
    Bonjour,

    J'ai un gros souci que je n'arrive pas à résoudre :

    Stack Trace

    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php at line 194 -+
    }
    // We need to pick the type hint class too
    if (($paramClass = $param->getClass()) !== null) {
    $parameterString .= '\\' . $paramClass->getName() . ' ';
    } else if ($param->isArray()) {
    $parameterString .= 'array ';

    at ReflectionParameter ->getClass ()
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php at line 194 -+

    at ProxyFactory ->_generateMethods (object(ClassMetadata))
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php at line 131 -+

    at ProxyFactory ->_generateProxyClass (object(ClassMetadata), 'AcDijonGretabotBundleEntityDomaineProxy', '/home/benoit/sf2projects/gretabotv2/app/cache/dev/doctrine/orm/Proxies/AcDijonGretabotBundleEntityDomaineProxy.php', '<?php namespace <namespace>; /** * THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE. */ class <proxyClassName> extends \<className> implements \Doctrine\ORM\Proxy\Proxy { private $_entityPersister; private $_identifier; public $__isInitialized__ = false; public function __construct($entityPersister, $identifier) { $this->_entityPersister = $entityPersister; $this->_identifier = $identifier; } /** @private */ public function __load() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; if (method_exists($this, "__wakeup")) { // call this after __isInitialized__to avoid infinite recursion // but before loading to emulate what ClassMetadata::newInstance() // provides. $this->__wakeup(); } if ($this->_entityPersister->load($this->_identifier, $this) === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } unset($this->_entityPersister, $this->_identifier); } } <methods> public function __sleep() { <sleepImpl> } public function __clone() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; $class = $this->_entityPersister->getClassMetadata(); $original = $this->_entityPersister->load($this->_identifier); if ($original === null) { throw new \Doctrine\ORM\EntityNotFoundException(); } foreach ($class->reflFields AS $field => $reflProperty) { $reflProperty->setValue($this, $reflProperty->getValue($original)); } unset($this->_entityPersister, $this->_identifier); } <cloneImpl> } }')
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Proxy/ProxyFactory.php at line 83 -+

    at ProxyFactory ->getProxy ('AcDijon\GretabotBundle\Entity\Domaine', array('id' => '2'))
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/UnitOfWork.php at line 2071 -+

    at UnitOfWork ->createEntity ('AcDijon\GretabotBundle\Entity\SousDomaine', array('id' => '18', 'nom' => 'Aménagement paysager', 'numero' => '201', 'slug' => 'amenagement-paysager', 'created' => object(DateTime), 'updated' => object(DateTime), 'deletedAt' => null, 'domaine_id' => '2'), array('deferEagerLoad' => true, 'fetchAlias' => 'p', 'fetchMode' => array('AcDijon\GretabotBundle\Entity\SousDomaine' => array('domaine' => '2'))))
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 208 -+
    at ObjectHydrator ->_getEntity (array('id' => '18', 'nom' => 'Aménagement paysager', 'numero' => '201', 'slug' => 'amenagement-paysager', 'created' => object(DateTime), 'updated' => object(DateTime), 'deletedAt' => null, 'domaine_id' => '2'), 'p')
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 429 -+

    at ObjectHydrator ->_hydrateRow (array('id0' => '18', 'nom1' => 'Aménagement paysager', 'numero2' => '201', 'slug3' => 'amenagement-paysager', 'created4' => '2012-03-29 11:01:41', 'updated5' => '2012-03-29 11:01:41', 'deleted_at6' => null, 'domaine_id7' => '2'), array('id0' => array('fieldName' => 'id', 'type' => object(IntegerType), 'isIdentifier' => true, 'dqlAlias' => 'p'), 'nom1' => array('fieldName' => 'nom', 'type' => object(StringType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'numero2' => array('fieldName' => 'numero', 'type' => object(IntegerType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'slug3' => array('fieldName' => 'slug', 'type' => object(StringType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'created4' => array('fieldName' => 'created', 'type' => object(DateTimeType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'updated5' => array('fieldName' => 'updated', 'type' => object(DateTimeType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'deleted_at6' => array('fieldName' => 'deletedAt', 'type' => object(DateTimeType), 'isIdentifier' => false, 'dqlAlias' => 'p'), 'domaine_id7' => array('isMetaColumn' => true, 'fieldName' => 'domaine_id', 'dqlAlias' => 'p', 'isIdentifier' => false)), array())
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 133 -+

    at ObjectHydrator ->_hydrateAll ()
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 99 -+

    at AbstractHydrator ->hydrateAll (object(PDOStatement), object(ResultSetMapping), array())
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php at line 615 -+

    at AbstractQuery ->execute (array(), '1')
    in /home/benoit/sf2projects/gretabotv2/vendor/doctrine/lib/Doctrine/ORM/AbstractQuery.php at line 413 -+

    at AbstractQuery ->getResult ()
    in /home/benoit/sf2projects/gretabotv2/src/AcDijon/GretabotBundle/Repository/SousDomaineRepository.php at line 21 -+

    at SousDomaineRepository ->findAllOrderedByName ()
    in /home/benoit/sf2projects/gretabotv2/src/AcDijon/GretabotBundle/Controller/Admin/SousDomaineController.php at line 24 -+

    at SousDomaineController ->indexAction ()

    at call_user_func_array (array(object(SousDomaineController), 'indexAction'), array())
    in kernel.root_dir/cache/dev/classes.php at line 3905 -+

    at HttpKernel ->handleRaw (object(Request), '1')
    in kernel.root_dir/cache/dev/classes.php at line 3875 -+

    at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/cache/dev/classes.php at line 4879 -+

    at HttpKernel ->handle (object(Request), '1', true)
    in kernel.root_dir/bootstrap.php.cache at line 547 -+

    at Kernel ->handle (object(Request))
    in /home/benoit/sf2projects/gretabotv2/web/app_dev.php at line 24 -
    Je ne comprends pas pourquoi ça cherche une classe timestamp. Je soupçonne un problème au niveau d'une définition d'une relation many to many dans mon modèle.

    Voici donc l'entity concernée :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    <?php
     
    /**
     * Description of SousDomaine
     */
     
    namespace ****\****\Entity;
     
    use Doctrine\ORM\Mapping as ORM;
    use Gedmo\Mapping\Annotation as Gedmo;
    use Symfony\Component\Validator\Constraints as Assert;
     
    /**
     * @ORM\Entity(repositoryClass="****\****\Repository\SousDomaineRepository")
     * @ORM\Table(name="gbot_SousDomaine")
     * @Gedmo\SoftDeleteable(fieldName="deletedAt")
     */
    class SousDomaine 
    {
        /**
         * @ORM\Id
         * @ORM\Column(type="integer")
         * @ORM\GeneratedValue
         */
        protected $id;
     
        /**
         * @ORM\Column(type="string", length=255, nullable=false)
         * @Assert\NotBlank(message="L'intitulé doit être renseigné")
         */
        protected $nom;  
     
        /**
         *
         * @var integer numero
         * @ORM\Column(type="integer", nullable=false)
         * @Assert\NotBlank(message="Veuillez donner un numéro à ce sous-domaine")
         * @Assert\Type(type="integer", message="Le numéro doit être un nombre")
         */
        protected $numero;
     
        /**
         * @Gedmo\Slug(fields={"nom"})
         * @ORM\Column(length=128, unique=true)
         */
        protected $slug;
     
        /**
         * @Gedmo\Timestampable(on="create")
         * @ORM\Column(type="datetime")
         */
        protected $created;
     
        /**
         * @Gedmo\Timestampable(on="update")
         * @ORM\Column(type="datetime")
         */
        protected $updated;
     
        /**
         * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
         */
        protected $deletedAt;
     
        /**
         * @ORM\ManyToOne(targetEntity="Domaine", inversedBy="sousDomaines")
         * @ORM\JoinColumn(name="domaine_id", referencedColumnName="id")
         */
        protected $domaine;   
     
        /**
         * @var ArrayCollection formacodes
         * @ORM\ManyToMany(targetEntity="Formacode")
         * @ORM\JoinTable(name="gbot_sousDomaines_formacodes",
         *                joinColumns={@ORM\JoinColumn(name="sousdomaine_id", referencedColumnName="id")},
         *                inverseJoinColumns={@ORM\JoinColumn(name="formacode_id", referencedColumnName="id")}
         * )
         */
        protected $formacodes;
     
        /**
         *
         * @var ArrayCollection codesRome
         * @ORM\ManyToMany(targetEntity="CodeRome")
         * @ORM\JoinTable(name="gbot_sousDomaines_codesRomes",
         *                joinColumns={@ORM\JoinColumn(name="sousdomaine_id", referencedColumnName="id")},
         *                inverseJoinColumns={@ORM\JoinColumn(name="coderome_id", referencedColumnName="id")}
         * )
         */
        protected $codesRome;
     
        /**
         *
         * @var ArrayCollection codesNsf
         * @ORM\ManyToMany(targetEntity="CodeNsf")
         * @ORM\JoinTable(name="gbot_sousDomaines_codesNsf",
         *                joinColumns={@ORM\JoinColumn(name="sousdomaine_id", referencedColumnName="id")},
         *                inverseJoinColumns={@ORM\JoinColumn(name="codensf_id", referencedColumnName="id")}
         * )
         */
        protected $codesNsf;
     
     
        /**
         * Get id
         *
         * @return integer 
         */
        public function getId()
        {
            return $this->id;
        }
     
        /**
         * Set domaine
         *
         * @param ****\****\Entity\Domaine $domaine
         */
        public function setDomaine(\****\****\Entity\Domaine $domaine)
        {
            $this->domaine = $domaine;
        }
     
        /**
         * Get domaine
         *
         * @return ****\****\Entity\Domaine 
         */
        public function getDomaine()
        {
            return $this->domaine;
        }
     
        public function __construct()
        {
            $this->formacodes = new \Doctrine\Common\Collections\ArrayCollection();
            $this->codesRome = new \Doctrine\Common\Collections\ArrayCollection();
            $this->codesNsf = new \Doctrine\Common\Collections\ArrayCollection();
        }
     
        /**
         * Add formacodes
         *
         * @param ****\****\Entity\Formacode $formacodes
         */
        public function addFormacode(\AcDijon\GretabotBundle\Entity\Formacode $formacodes)
        {
            $this->formacodes[] = $formacodes;
        }
     
        /**
         * Get formacodes
         *
         * @return Doctrine\Common\Collections\Collection 
         */
        public function getFormacodes()
        {
            return $this->formacodes;
        }
     
        /**
         * Set slug
         *
         * @param string $slug
         */
        public function setSlug($slug)
        {
            $this->slug = $slug;
        }
     
        /**
         * Get slug
         *
         * @return string 
         */
        public function getSlug()
        {
            return $this->slug;
        }
     
        /**
         * Set created
         *
         * @param datetime $created
         */
        public function setCreated($created)
        {
            $this->created = $created;
        }
     
        /**
         * Get created
         *
         * @return datetime 
         */
        public function getCreated()
        {
            return $this->created;
        }
     
        /**
         * Set updated
         *
         * @param datetime $updated
         */
        public function setUpdated($updated)
        {
            $this->updated = $updated;
        }
     
        /**
         * Get updated
         *
         * @return datetime 
         */
        public function getUpdated()
        {
            return $this->updated;
        }
     
        /**
         * Set deletedAt
         *
         * @param datetime $deletedAt
         */
        public function setDeletedAt($deletedAt)
        {
            $this->deletedAt = $deletedAt;
        }
     
        /**
         * Get deletedAt
         *
         * @return datetime 
         */
        public function getDeletedAt()
        {
            return $this->deletedAt;
        }
     
        /**
         * Set nom
         *
         * @param string $nom
         */
        public function setNom($nom)
        {
            $this->nom = $nom;
        }
     
        /**
         * Get nom
         *
         * @return string 
         */
        public function getNom()
        {
            return $this->nom;
        }
     
        /**
         * Add codesRome
         *
         * @param ****\****\Entity\CodeRome $codesRome
         */
        public function addCodeRome(\AcDijon\GretabotBundle\Entity\CodeRome $codesRome)
        {
            $this->codesRome[] = $codesRome;
        }
     
        /**
         * Get codesRome
         *
         * @return Doctrine\Common\Collections\Collection 
         */
        public function getCodesRome()
        {
            return $this->codesRome;
        }
     
        /**
         * Add codesNsf
         *
         * @param ****\****\Entity\CodeNsf $codesNsf
         */
        public function addCodeNsf(\****\****\Entity\CodeNsf $codesNsf)
        {
            $this->codesNsf[] = $codesNsf;
        }
     
        /**
         * Get codesNsf
         *
         * @return Doctrine\Common\Collections\Collection 
         */
        public function getCodesNsf()
        {
            return $this->codesNsf;
        }
     
        /**
         * Set numero
         *
         * @param integer $numero
         */
        public function setNumero($numero)
        {
            $this->numero = $numero;
        }
     
        /**
         * Get numero
         *
         * @return integer 
         */
        public function getNumero()
        {
            return $this->numero;
        }
    }
    L'action :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    public function indexAction()
        {
            $sousdomaines = $this->getDoctrine()->getRepository('AcDijonGretabotBundle:SousDomaine')->findAllOrderedByName();
            return array('sousdomaines', $sousdomaines);
        }
    Le repository :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    class SousDomaineRepository extends EntityRepository
    {
        public function findAllOrderedByName()
        {
            $query = $this->createQueryBuilder('p')
                        ->orderBy("p.nom", "ASC")
                        ->getQuery();
     
            return $query->getResult();        
        }
    }
    Je ne sais pas trop comment poser ma question car je ne comprends ce problème. Mais si quelqu'un a une idée, il m'aiderait bien.

    Merci d'avance

  2. #2
    Membre régulier
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    155
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 155
    Points : 76
    Points
    76
    Par défaut
    La classe Domaine peut peut-être être utile :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    <?php
     
    /**
     * Description of Domaine
     */
     
    namespace AcDijon\GretabotBundle\Entity;
     
    use Doctrine\ORM\Mapping as ORM;
    use Gedmo\Mapping\Annotation as Gedmo;
    use Symfony\Component\Validator\Constraints as Assert;
     
    /**
     * @ORM\Entity(repositoryClass="AcDijon\GretabotBundle\Repository\DomaineRepository")
     * @ORM\Table(name="gbot_Domaine")
     * @Gedmo\SoftDeleteable(fieldName="deletedAt")
     */
    class Domaine 
    {
        /**
         * @ORM\Id
         * @ORM\Column(type="integer")
         * @ORM\GeneratedValue(strategy="AUTO")
         */
        protected $id;
     
        /**
         * @Assert\NotBlank(message="L'intitulé doit être renseigné")
         * @ORM\Column(type="string", length=255, nullable=false)
         */
        protected $nom;
     
        /**
         * @Gedmo\Slug(fields={"nom"})
         * @ORM\Column(length=128, unique=true)
         */
        protected $slug;
     
        /**
         * @Gedmo\Timestampable(on="create")
         * @ORM\Column(type="datetime")
         */
        protected $created;
     
        /**
         * @Gedmo\Timestampable(on="update")
         * @ORM\Column(type="datetime")
         */
        protected $updated;
     
        /**
         * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
         */
        protected $deletedAt;
     
        /**
         * @ORM\OneToMany(targetEntity="SousDomaine", mappedBy="domaine")
         */
        protected $sousDomaines;
     
        public function __construct()
        {
            $this->sousDomaines = new \Doctrine\Common\Collections\ArrayCollection();
        }
     
        /**
         * Get id
         *
         * @return integer 
         */
        public function getId()
        {
            return $this->id;
        }
     
        /**
         * Add sousDomaines
         *
         * @param AcDijon\GretabotBundle\Entity\SousDomaine $sousDomaines
         */
        public function addSousDomaine(\AcDijon\GretabotBundle\Entity\SousDomaine $sousDomaines)
        {
            $this->sousDomaines[] = $sousDomaines;
        }
     
        /**
         * Get sousDomaines
         *
         * @return Doctrine\Common\Collections\Collection 
         */
        public function getSousDomaines()
        {
            return $this->sousDomaines;
        }
     
        /**
         * Set slug
         *
         * @param string $slug
         */
        public function setSlug($slug)
        {
            $this->slug = $slug;
        }
     
        /**
         * Get slug
         *
         * @return string 
         */
        public function getSlug()
        {
            return $this->slug;
        }
     
        /**
         * Set created
         *
         * @param timestamp $created
         */
        public function setCreated(\timestamp $created)
        {
            $this->created = $created;
        }
     
        /**
         * Get created
         *
         * @return timestamp 
         */
        public function getCreated()
        {
            return $this->created;
        }
     
        /**
         * Set updated
         *
         * @param timestamp $updated
         */
        public function setUpdated(\timestamp $updated)
        {
            $this->updated = $updated;
        }
     
        /**
         * Get updated
         *
         * @return timestamp 
         */
        public function getUpdated()
        {
            return $this->updated;
        }
     
        /**
         * Set deletedAt
         *
         * @param datetime $deletedAt
         */
        public function setDeletedAt($deletedAt)
        {
            $this->deletedAt = $deletedAt;
        }
     
        /**
         * Get deletedAt
         *
         * @return datetime 
         */
        public function getDeletedAt()
        {
            return $this->deletedAt;
        }
     
        /**
         * Set nom
         *
         * @param string $nom
         */
        public function setNom($nom)
        {
            $this->nom = $nom;
        }
     
        /**
         * Get nom
         *
         * @return string 
         */
        public function getNom()
        {
            return $this->nom;
        }
    }

  3. #3
    Membre régulier
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    155
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 155
    Points : 76
    Points
    76
    Par défaut
    La classe Formacode :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    <?php
     
    /**
     * Description of Formacode
     */
     
    namespace AcDijon\GretabotBundle\Entity;
     
    use Doctrine\ORM\Mapping as ORM;
    use Gedmo\Mapping\Annotation as Gedmo;
    use Symfony\Component\Validator\Constraints as Assert;
     
    /**
     * @ORM\Entity(repositoryClass="AcDijon\GretabotBundle\Repository\FormacodeRepository")
     * @ORM\Table(name="gbot_Formacode")
     * @Gedmo\SoftDeleteable(fieldName="deletedAt")
     */
    class Formacode 
    {
        /**
         * @ORM\Id
         * @ORM\Column(type="integer")
         */
        protected $id;
     
        /**
         * @ORM\Column(type="string", length=255, nullable=false)
         * @Assert\NotBlank(message="L'intitulé doit être renseigné")
         */
        protected $nom;
     
        /**
         * @ORM\Column(type="string", length=50)
         */
        protected $hierarchie;    
     
        /**
         * @Gedmo\Slug(fields={"nom"})
         * @ORM\Column(length=128, unique=true)
         */
        protected $slug;
     
        /**
         * @Gedmo\Timestampable(on="create")
         * @ORM\Column(type="datetime")
         */
        protected $created;
     
        /**
         * @Gedmo\Timestampable(on="update")
         * @ORM\Column(type="datetime")
         */
        protected $updated;
     
        /**
         * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
         */
        protected $deletedAt;
     
        /**
         * Set hierarchie
         *
         * @param string $hierarchie
         */
        public function setHierarchie($hierarchie)
        {
            $this->hierarchie = $hierarchie;
        }
     
        /**
         * Get hierarchie
         *
         * @return string 
         */
        public function getHierarchie()
        {
            return $this->hierarchie;
        }
     
        /**
         * Set slug
         *
         * @param string $slug
         */
        public function setSlug($slug)
        {
            $this->slug = $slug;
        }
     
        /**
         * Get slug
         *
         * @return string 
         */
        public function getSlug()
        {
            return $this->slug;
        }
     
        /**
         * Set created
         *
         * @param datetime $created
         */
        public function setCreated($created)
        {
            $this->created = $created;
        }
     
        /**
         * Get created
         *
         * @return datetime 
         */
        public function getCreated()
        {
            return $this->created;
        }
     
        /**
         * Set updated
         *
         * @param datetime $updated
         */
        public function setUpdated($updated)
        {
            $this->updated = $updated;
        }
     
        /**
         * Get updated
         *
         * @return datetime 
         */
        public function getUpdated()
        {
            return $this->updated;
        }
     
        /**
         * Set deletedAt
         *
         * @param datetime $deletedAt
         */
        public function setDeletedAt($deletedAt)
        {
            $this->deletedAt = $deletedAt;
        }
     
        /**
         * Get deletedAt
         *
         * @return datetime 
         */
        public function getDeletedAt()
        {
            return $this->deletedAt;
        }
     
        /**
         * Set nom
         *
         * @param string $nom
         */
        public function setNom($nom)
        {
            $this->nom = $nom;
        }
     
        /**
         * Get nom
         *
         * @return string 
         */
        public function getNom()
        {
            return $this->nom;
        }
     
        /**
         * Set id
         *
         * @param integer $id
         */
        public function setId($id)
        {
            $this->id = $id;
        }
     
        /**
         * Get id
         *
         * @return integer 
         */
        public function getId()
        {
            return $this->id;
        }
     
     
     
    }

  4. #4
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Juin 2004
    Messages
    14
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Tunisie

    Informations forums :
    Inscription : Juin 2004
    Messages : 14
    Points : 15
    Points
    15
    Par défaut
    Salut jekif,
    Pense à supprimé \timestamp de tes getter and setter des champs updated et created dans l'Entity Domaine.

  5. #5
    Membre régulier
    Homme Profil pro
    Inscrit en
    Novembre 2006
    Messages
    155
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France

    Informations forums :
    Inscription : Novembre 2006
    Messages : 155
    Points : 76
    Points
    76
    Par défaut
    Mince j'avais pas vu !

    Merci Rmed19

    Par contre j'avais généré automatiquement, bizarre...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [2.x] Class string does not exist
    Par yamatelegomes dans le forum Symfony
    Réponses: 0
    Dernier message: 04/02/2013, 19h04
  2. 500 Internal Server Error
    Par wallawalla dans le forum Free
    Réponses: 4
    Dernier message: 18/06/2007, 14h03
  3. 500 Internal Server Error [OVH]
    Par Woufeigh dans le forum Apache
    Réponses: 1
    Dernier message: 08/04/2007, 01h15
  4. Error 500 - Internal server error
    Par Amrac dans le forum Serveurs (Apache, IIS,...)
    Réponses: 1
    Dernier message: 04/04/2007, 14h20
  5. [SERVLET][STRUTS]Error 500--Internal Server Error
    Par Devil666 dans le forum Struts 1
    Réponses: 7
    Dernier message: 27/06/2005, 13h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo