... ['%memcached.servers%', '%memcached.config%']
doctrine.cache.memcached:
class: Doctrine\Common\Cache\MemcachedCache
calls:
- [ setMemcached, [ '@memcached.doctrine' ] ]
```
and all It's ok but now How ...
Hey there!
Yes, you're right! But either way, Doctrine won't make a query to the database if it doesn't need to. In other words, both ways will result in 0 queries if there is no change. But, there will be a small performance boost with your method, since Doctrine doesn't even need to check on this.
Cheers! ...
For everyone that has the connection refused error:
Add the following parameter to doctrines.yaml: "unix_socket: /path/to/mysql.sock"
For MAMP is this: /Applications/MAMP/tmp/mysql/mysql.sock
Symfony doctrine docs ...
Hey Amin A.
This problem is related to a release of Doctrine migration package, we're investigating the issue but at least you can read a couple of solutions that Ryan provides here: https://symfonycasts.com/screencast/doctrine-relations/comment-entity#comment-4316029472
Cheers! ...
hello
wen i try to create migration (php bin/console make:migration) for updating user firstname property I got an error:
Attempted to load class "AbstractMigration" from namespace "Doctrine\DBAL\Migrations".
Did you forget a "use" statement for "Doctrine\Migrations\AbstractMigration"?
can you help me with this? ...
Hey!
Yea, this is a bug with PHP 7.3 and our version of the dependencies. We're going to upgrade the dependencies soon to avoid this. You can also do this on your own by running `composer update doctrine/orm` - the bug ...
Is creating query in CommentRepository with `->leftJoin(c.article)->addSelect(article) going to solve the N+1 issue? This is from your tutorial `Going Pro with Doctrine`, but actually the situation there was the ...
Gey Gustavo,
I'm not sure Doctrine has such annotation :) How will Doctrine know to whom assign it? It's only possible to set genus to NULL on deleting. I *think* you can add a listener to listen to preRemove event and implement a custom logic in it to assign it to another Genus.
Cheers! ...
Hi!
It is a great command line tool to create Entities and all other tasks for doctrine!
Where I can get it? ...how to install it?
I'm using ZF3 + Doctrine... But as I can see some Symfony modules could be used as well.
Please, help! ...
Hey Dmitriy,
Yes, it's possible, but this relates to Doctrine not Symfony since we're talking about ORM. There're a few way to do so, each has its own pros and cons, see the docs for more information and examples: https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/inheritance-mapping.html
Cheers! ...
Hey Abdelamine,
Do you use the Doctrine\Common\ClassLoader somewhere in your project? Probably not, I think it's just used somewhere internally. If so - you don't need to do any actions, you just need to wait for ...
Hey Steeven,
Hm, try to typehint your $em argument with "Doctrine\ORM\EntityManagerInterface" interface as suggested in error message, do you still have the same problem? Not sure 100% but probably Doctrine\ORM\EntityManager alias was removed that caused some BC breaks.
Cheers! ...
|
// ... lines 1 - 2
|
|
namespace App\Repository; |
|
|
|
use App\Entity\Answer; |
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
|
use Doctrine\Persistence\ManagerRegistry; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AnswerRepository extends ServiceEntityRepository |
|
{ |
|
public function __construct(ManagerRegistry $registry) |
|
{ |
|
parent::__construct($registry, Answer::class); |
|
} |
|
// ... lines 21 - 49
|
|
} |
See Code Block in Script
|
imports: |
|
- { resource: parameters.yml } |
|
- { resource: security.yml } |
|
- { resource: services.yml } |
|
|
|
|
|
|
|
parameters: |
|
locale: en |
|
|
|
framework: |
|
// ... lines 12 - 35
|
|
|
|
twig: |
|
// ... lines 38 - 42
|
|
|
|
doctrine: |
|
// ... lines 45 - 72
|
See Code Block in Script
|
// ... lines 1 - 43
|
|
|
|
doctrine: |
|
dbal: |
|
driver: pdo_mysql |
|
host: "%database_host%" |
|
port: "%database_port%" |
|
dbname: "%database_name%" |
|
user: "%database_user%" |
|
password: "%database_password%" |
|
charset: UTF8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
// ... lines 60 - 72
|
See Code Block in Script
Hey Nicholas Clark!
Ah yes, I see your question! Indeed, I think this particular join is just a little confusing. To answer your question, no, Doctrine doesn't default to a specific note. Doctrine, fortunately, is much ...
... doctrine behaviour with the newer versions), or if it's specific to my computer, but in the meantime i'll just create an .env.local file with DATABASE_URL using the correct docker port, hoping that it will do for the rest of ...
... ",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.10",
"doctrine ...
... `doctrine/doctrine-migrations-bundle` somehow being upgraded from version 2.1 to 3. I didn't see how this happened in what you posted, but basically - it's complaining that your existing doctrine_migrations.yaml file is using ...
... platform/vendor/doctrine/orm/lib/Doctrine/ORM/ORMInvalidArgumentException.php",
"line": 177,
"args": []
},
{
"namespace": "Doctrine\\ORM",
"short_class": "ORMInvalidArgumentException ...
2725
Doctrine
Filter Results