When using the command:
$ php app/console doctrine:schema:create
We get this message
ATTENTION: This operation should not be executed in a production environment.
Why shouldn't we use it in production ?
How should we do the first deployment ?
A repository in a term used by many ORMs (Object Relational Mappers), doctrine is just one of these. It means the place where our data can be accessed from, a repository of data. This is to distinguish it from a database as a repository does not care how its data is stored.
A Doctrine proxy is just a wrapper that extends an entity class to provide Lazy Loading for it. By default, when you ask the Entity Manager for an entity that is associated with another entity, the associated entity won't be loaded from the database, but wrapped into a proxy object.
Please note. The ADF Doctrine Library is the single repository of doctrinal knowledge within Defence. Under CDF's direction doctrine has been unified under one hierarchy and in one repository; One Defence, One Doctrine.
Doctrine Query Language (DQL) is an Object Query Language created for helping users in complex object retrieval. You should always consider using DQL (or raw SQL) when retrieving relational data efficiently (eg. when fetching users and their phonenumbers).
Ahaha there are different schools for that.
Startup way: doctrine:schema:create first time in production, doctrine:schema:update --force every updates
Cautious way: dump sql first time, sql scripts then for updates
Expert way: http://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html
Personally I use the first method, which works just fine. You could always do a --dump-sql to see what's going on before updating using --force
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With