0

I am a new developer on an existing php project that respect its proper mvc. I have successfully "plug" a Symfony installation on it, in order to replace some of the already existing Symfony components such as Router, Request etc...

I have some functionalities to develop and I am isolating them under one bundle.

My question is : can I use Doctrine for this one in order to start a sanitize work on the existing database ? If I want to use foreign keys with the existing others tables I need to configure the mapping on them...It's a problem because I cannot start a refactoring for the objects of this project that are not entities-like. Is there a solution to use doctrine only for my bundle and keeping the use of foreign-keys, cascading etc... ?

Thank you for all

1 Answer 1

1

If you wish to only generate the entities for your isolated bundle, you can do it.

Check documentation: http://symfony.com/doc/current/bundles/SensioGeneratorBundle/commands/generate_doctrine_entity.html

Are you planning to create your tables in the same database or in a differente database?

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you bkazuo. I have already do the job of preparing my entities in my proper bundle. My problem is about the foreign keys with the objects of the existing project (unmapped by doctrine)... I am on the same database

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.