-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fatal error: Uncaught Doctrine\ORM\Mapping\MappingException #7109
Comments
without change in entity the error is same... |
|
I have changed the path:
but still error is coming : |
Please don't paste messages with Anyway, the autoloading is up to you: we only provide the metadata loading once a class can be loaded |
these numbers were coming with errors not pasted by me. |
i am unable to solve the problem |
@flik first step (unrelated to ORM) is to make this work: var_dump(new User()); After that works, retry the snippet above. |
here is the output of above code: |
Right, now you need to make that same code work in the context of the script that raised:
|
When I not include the entity files with
then error comes |
I have shared the full code of User class in first message in this thread. The code was generated by doctrine. |
I created a gist at https://gist.github.com/Ocramius/04e50ce818ecfc95c8e5649f7a39c111 with a working setup. What changed is this: diff --git a/test.php b/test.php
index 84bd2d8..4792364 100644
--- a/test.php
+++ b/test.php
@@ -17,7 +17,7 @@ $dbParams = array(
'dbname' => 'database_a',
);
-$config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode);
+$config = Setup::createAnnotationMetadataConfiguration($paths, $isDevMode, null,null,false);
$em = $entityManager = EntityManager::create($dbParams, $config);
$data = $em->getRepository('User'); The problem is that |
Now, after the above changes. I am getting this output
|
Use |
Bundle of thanks :) man |
It is working now. |
Thanks mate !!! its working. |
Here is generated entity code:
Here is my code I just made little change in generated entity and added database name before table name :
error detail:
The text was updated successfully, but these errors were encountered: