Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception if abstract class entity #7

Closed
kihamo opened this issue Nov 29, 2014 · 0 comments
Closed

Exception if abstract class entity #7

kihamo opened this issue Nov 29, 2014 · 0 comments

Comments

@kihamo
Copy link

kihamo commented Nov 29, 2014

Entity example

<?php
namespace App\Entity;

use Symfony\Component\HttpFoundation\File\UploadedFile;

/**
 * @MappedSuperclass
 * @HasLifecycleCallbacks
 */
abstract class ImageUpload
{
 // bla-bla-lba
}

Dump

$registry = new HandlerRegistry();
$registry->addSubscribingHandler(new DateHandler());

$generator = new Map(array('class' => new ClassFixtureGenerator()));

$dumper = new ORMDumper($em, $registry, $generator);
$dumper->dump($path, 'class', array('namespace' => 'App\Fixture'));

Result

  [PDOException]                                                                                             
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'test.imageupload' doesn't exist  



Exception trace:
 () at /Users/kihamo/test/application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699
 PDO->query() at /Users/kihamo/test/application/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:699
 Doctrine\DBAL\Connection->executeQuery() at /Users/kihamo/test/application/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:930
 Doctrine\ORM\Persisters\BasicEntityPersister->loadAll() at /Users/kihamo/test/application/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:181
 Doctrine\ORM\EntityRepository->findBy() at /Users/kihamo/test/application/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:164
 Doctrine\ORM\EntityRepository->findAll() at /Users/kihamo/test/application/vendor/sp/fixture-dumper/src/Sp/FixtureDumper/Generator/AbstractGenerator.php:287
 Sp\FixtureDumper\Generator\AbstractGenerator->getModels() at /Users/kihamo/test/application/vendor/sp/fixture-dumper/src/Sp/FixtureDumper/Generator/AbstractGenerator.php:80
 Sp\FixtureDumper\Generator\AbstractGenerator->generate() at /Users/kihamo/test/application/vendor/sp/fixture-dumper/src/Sp/FixtureDumper/AbstractDumper.php:80
 Sp\FixtureDumper\AbstractDumper->dump() at /Users/kihamo/test/application/test.php:40
kihamo pushed a commit to kihamo/fixture-dumper that referenced this issue Nov 29, 2014
Spea added a commit that referenced this issue Dec 3, 2014
Exception if abstract class entity #7
@kihamo kihamo closed this as completed Dec 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant