2704 search results for Doctrine

// ... lines 1 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
// ... lines 20 - 23
return sprintf('%s.discontinued = %s', $targetTableAlias, $this->getParameter('discontinued'));
}
// ... lines 26 - 27
See Code Block in Script
// ... lines 1 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
if ($targetEntity->getReflectionClass()->name != 'AppBundle\Entity\FortuneCookie') {
return '';
}
return sprintf('%s.discontinued = false', $targetTableAlias);
}
// ... lines 26 - 27
See Code Block in Script
// ... lines 1 - 7
class DiscontinuedFilter extends SQLFilter
{
// ... lines 10 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
if ($targetEntity->getReflectionClass()->name != 'AppBundle\Entity\FortuneCookie') {
return '';
}
// ... lines 23 - 24
}
}
See Code Block in Script
// ... lines 1 - 7
class DiscontinuedFilter extends SQLFilter
{
// ... lines 10 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
var_dump($targetEntity);die;
}
}
See Code Block in Script
20 lines | src/Doctrine/DiscontinuedFilter.php
// ... lines 1 - 10
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias): string
{
// ... lines 13 - 16
return sprintf('%s.discontinued = %s', $targetTableAlias, $this->getParameter('discontinued'));
}
// ... lines 19 - 20
See Code Block in Script
20 lines | src/Doctrine/DiscontinuedFilter.php
// ... lines 1 - 10
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias): string
{
// ... lines 13 - 16
return sprintf('%s.discontinued = false', $targetTableAlias);
}
// ... lines 19 - 20
See Code Block in Script
20 lines | src/Doctrine/DiscontinuedFilter.php
// ... lines 1 - 8
class DiscontinuedFilter extends SQLFilter
{
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias): string
{
if ($targetEntity->getReflectionClass()->name !== FortuneCookie::class) {
return '';
}
// ... lines 16 - 17
}
}
See Code Block in Script
15 lines | src/Doctrine/DiscontinuedFilter.php
// ... lines 1 - 9
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias): string
{
dd($targetEntity, $targetTableAlias);
}
// ... lines 14 - 15
See Code Block in Script
Starting in Symfony2 Course 3 2.4

... hour or so, we're going to learn what a service is, find out more about the core Symfony services, and create a few of our own. In Doctrine, we'll create some Doctrine associations, including ManyToOne and ManyToMany ...

29 videos
|
1:34:37
Upgrading to DoctrineBundle 2.0

... Let's look at the latest list of deprecated code. Hmm... there's a lot of stuff related to Doctrine. Ok: two tricky things are happening in the Doctrine world right now that make upgrading to Symfony 5... a bit more ...

6:50
Database Config and Automatic Table Creation

We described the genus table to Doctrine via annotations, but this table doesn't exist yet. No worries - Doctrine can create it for us! And actually, we don't even have a database yet. Doctrine can also handle this ...

2:05
DoctrineBundle Updates Recipe Upgrade

... important changes are under "Services aliases". Previously, if you wanted to get the doctrine service, you could use the RegistryInterface type-hint for autowiring. Now you should use ManagerRegistry. Where do we use ...

11:22
Creating an Entity Class

Yo guys! Time to level-up our project in a big way. I mean, big. This series is all about an incredible library called Dog-trine. Wait, that's not right - it's Doctrine. But anyways, Doctrine is kinda like a dog: a dog ...

5:29
Inserting and Querying Data

... Doctrine and is in charge of saving objects and fetching them back out. To get the entity manager, first grab a service from the container called doctrine and call getManager on it: Saving is a two-step process: persist ...

6:57
Entity Class

One of the coolest, but maybe most surprising things about Doctrine, is that it wants you to pretend like the database doesn't exist! Yea, instead of thinking about tables and columns, Doctrine wants us to think about ...

8:59
Updating an Entity

... story. When you call flush(), Doctrine loops over all of the entity objects that it "knows about" and "saves" them. And that "save" is smart. If Doctrine determines that an entity has not been saved yet, it will execute an ...

5:24
Joining Across a ManyToMany EXTRA_LAZY Fetch

... then only two scientists! Yes! But now click the Doctrine icon down in the web debug toolbar to see how the queries look on this page. This is really interesting: we have one query that's repeated many times: it selects all ...

5:34
Persisting to the Database

We have a beautiful entity class and, thanks to the migrations that we just executed, we have a corresponding question table in the database. Time to insert some data! One of the key philosophies of Doctrine is that it ...

8:42
Auto-set the Owner Entity Listener

... good thing. Hmm. Don't worry, I'll tell you which one I would use and why. Our options include an API Platform event listener - a topic we haven't talked about yet - an API Platform data persister or a Doctrine event ...

9:46
Users Need Passwords plainPassword

... text password, encrypt it through the bcrypt algorithm and store that on the password property. How? The best way is to set the plain-text password on the User and encode it automatically via a Doctrine listener when it ...

3:32