2725 search results for Doctrine

... When I query for "Müller" I get the results Muller and Müller. Is there a way how I get only Müller, when I query for Müller? I work with Symfony 3 and my database setting is like this: ```yaml doctrine ...
Michael-K
Michael-K
Read Full Comment
... basically means doing the same thing as the command: https://github.com/hautelook/AliceBundle/blob/master/src/Doctrine/Command/LoadDataFixturesCommand.php#L195. That may or may not be tricky - usually I'm hoping to be able to ...
weaverryan
weaverryan
Read Full Comment
Hello everyone, I just finish the course about "Doctrine & The Database" and I want to follow this course. I'm working with the same code from the old course. Do you have an idea why I've this error when I try to ...
... more details about that: https://stackoverflow.com/questions/7451945/why-does-doctrine-say-it-cant-find-the-pdo-driver Cheers!
weaverryan
weaverryan
Read Full Comment
... anything in the tutorial covering this case, so I'm guessing the behavior changed from when this was created and the current stable version of Symfony/Doctrine? ...
For Symfony 4.2 with Doctrine Fixtures 3.1: behat.yml.dist: ``` default: suites: default: contexts: - FeatureContext: kernel: '@kernel ...
... fetches them. We do that here: https://symfonycasts.com/screencast/doctrine-relations/join-n-plus-one#solving-the-n-1-extra-queries-problem. Well, that is an example of starting with a Comment and joining back to an ...
weaverryan
weaverryan
Read Full Comment
... is the correct approach. I usually: create the column but allow NULL, set value on that column for all rows with the next query, and finally use one more ALTER TABLE to make it NOT NULL. Doctrine migrations are great for structure changes - but it can't correctly determine how to handle data in these situations. Cheers!
weaverryan
weaverryan
Read Full Comment
... a project in production and need to add NOT NULL (and no default) field. You cannot just truncate database table. Doctrine migrations become somewhat unusable in this case. And it's not something special or rare: these ...
... ('admin/advert/index.html.twig', [ 'pagination' => $pagination, ]); } ``` doesn't seem to work anymore after updating symfony Unable to guess how to get a Doctrine instance from the request information for parameter "advert". ...
I might found a bug. In your `security.yaml` with two authenticator and and one entry point (even if you indent entry_point correctly), if you want to run``` php bin/console debug:config doctrine``` or any other ...
Thank you. I did it. Here is my code: ``` namespace App\Command; use App\Entity\Card; use Doctrine\ORM\EntityManagerInterface; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input ...
... Hi, I'm wondering what this config means. ``` # config/packages/doctrine.yaml doctrine: orm: mappings: ``` under https://symfony.com/doc/master/bundles/DoctrineBundle/configuration.html#mapping ...
... ---------------------------------------------------------------------------------------- User Deprecated: Doctrine\Common\ClassLoader is deprecated. ---------------------------------------------------------------------------------------- Am I the only I see it??? What ...
skatAn8rwpos
skatAn8rwpos
Read Full Comment
... people say that MySQL could have less performance than Redis for storing session but I think in my case, it doesn't make a considerable difference. I am going to follow this http://symfony.com/doc/3.4/doctrine/pdo_session_storage.html for the configuration
Hey toporovvv The thing about owning & inverse side is because Doctrine needs to know which table holds the associated ID, so then it can generate the SQL query correctly. Let's say that you have "Post" and "Image ...
MolloKhan
MolloKhan
Read Full Comment
... when Doctrine is working, but your listener is not actually needed. Good find ;). In Symfony 4.2, that config will be ON by default... because it's just THAT awesome :p. Cheers!
weaverryan
weaverryan
Read Full Comment
... Hi Ryan I've been following along and loving the series. You've got me using PHPStorm too which is awesome. Heading on to the doctrine tuts next and really looking forward to them. I am also using WebPack Encore in a ...
76 lines | src/Entity/Answer.php
// ... lines 1 - 2
namespace App\Entity;
use App\Repository\AnswerRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AnswerRepository::class)
*/
class Answer
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="text")
*/
private $content;
/**
* @ORM\Column(type="string", length=255)
*/
private $username;
/**
* @ORM\Column(type="integer")
*/
private $votes;
public function getId(): ?int
{
return $this->id;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): self
{
$this->content = $content;
return $this;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(string $username): self
{
$this->username = $username;
return $this;
}
public function getVotes(): ?int
{
return $this->votes;
}
public function setVotes(int $votes): self
{
$this->votes = $votes;
return $this;
}
}
See Code Block in Script
58 lines | src/Entity/Tag.php
// ... lines 1 - 2
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\TagRepository")
*/
class Tag
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=180)
*/
private $slug;
public function getId()
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
}
See Code Block in Script