Mysql
 sql >> база данни >  >> RDS >> Mysql

Symfony 3.4 Няма класове метаданни за обработка Грешка

Да, накрая открих, че проблемът е с John.orm.php файл, който ще се генерира, когато стартирам php bin/console doctrine:generate:entity

Създадох клас Entity с помощта на следната команда

php bin/console doctrine:generate:entity

След това ще поиска

Welcome to the Doctrine2 entity generator

This command helps you generate Doctrine2 entities.

First, you need to give the entity name you want to generate.
You must use the shortcut notation like AcmeBlogBundle:Post.

The Entity shortcut name: AppBundle:John

Determine the format to use for the mapping information.

Configuration format (yml, xml, php, or annotation) [annotation]: php

Instead of starting with a blank entity, you can add some fields now.
Note that the primary key will be added automatically (named id).

Available types: array, simple_array, json_array, object,
boolean, integer, smallint, bigint, string, text, datetime, datetimetz,
date, time, decimal, float, binary, blob, guid.

New field name (press <return> to stop adding fields): id
 Field "id" is already defined.
New field name (press <return> to stop adding fields): username
Field type [string]: string
Field length [255]:
Is nullable [false]: true
Unique [false]: false

New field name (press <return> to stop adding fields): password
Field type [string]:
Field length [255]:
Is nullable [false]: true
Unique [false]:

New field name (press <return> to stop adding fields): dob
Field type [string]: date
Is nullable [false]: true
Unique [false]:

New field name (press <return> to stop adding fields):


  Entity generation


  created .\src\AppBundle/Entity/John.php
  created .\src\AppBundle/Resources/config/doctrine/
  created .\src\AppBundle/Resources/config/doctrine/John.orm.php
> Generating entity class G:\XAMPP\htdocs\project\src\AppBundle\Entity\John.php:
 OK!
> Generating repository class G:\XAMPP\htdocs\project\src\AppBundle\Repository\J
ohnRepository.php: OK!
> Generating mapping file G:\XAMPP\htdocs\project\src\AppBundle\Resources\config
\doctrine\John.orm.php: OK!


  Everything is OK! Now get to work :).



G:\XAMPP\htdocs\project>

И след успех той ще създаде клас обект в AppBundle\Entity; папка и клас хранилище в AppBundle\Repository; също така ще генерира John.orm.php в AppBundle\Resources\config\doctrine\John.orm.php

След изтриване на John.orm.php файл, ако стартирам php bin/console doctrine:schema:update --force след това ще генерира таблици.



  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Замяна на стойност в разделен със запетая низ в MySQL?

  2. Как мога да изпратя автоматичен имейл от MySQL записи?

  3. MySQL средно на всеки 4 реда

  4. Записване на елементи в MySQL база данни в Scrapy

  5. MySQL рейтинг с тегло