SnefIT Posted May 5, 2017 Share Posted May 5, 2017 Hi, What is the way to get ORM entities working in a module? Do you have to create the proxies yourself or is that done automatically? Do I have to place them in a special directory? SnefIT Link to comment Share on other sites More sharing options...
phinq1910 Posted May 8, 2017 Share Posted May 8, 2017 Yes, for almost case, they are can be. Link to comment Share on other sites More sharing options...
SnefIT Posted May 8, 2017 Author Share Posted May 8, 2017 Are there any examples on how to start with Doctrine ORM in modules? Where to place the entities and stuff like that. Link to comment Share on other sites More sharing options...
vivizio Posted October 8, 2018 Share Posted October 8, 2018 I am also interested in example of using Doctrine ORM in module. Thanks! Link to comment Share on other sites More sharing options...
ahmed_Rabii Posted December 28, 2018 Share Posted December 28, 2018 (edited) Hi, I'm using Prestashop 1.7.5 To use Doctrine ORM in module there is some configuration must be edited in the "Project_dir/app/config/config.yml" orm: mappings: # define custom mapping custom_mapping: type: annotation prefix: MyModule\Entity\ # define prefix to load your entityes from dir: "%kernel.project_dir%/modules/mymodule/src/Entity" # define directory to load your entityes from is_bundle: false # this is to tell orm that this is not a symfony bundle so now after setting up your controllers and forms , you can take advantage of the full Symfony power in developing your module. I know this is not a perfect solution, if any one has a way to do the same thing from the inside of the module that would be great Edited December 28, 2018 by ahmed_Rabii (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now