🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.php
Article #232441

Re: Symfony 4 - jak projektować bazę danych pod Doctrine?

#232441
From: ww
Date: Wed, 24 Apr 2019 06:24
18 lines
1790 bytes
W dniu 2019-04-23 o 19:10, Marek S pisze:
> W dniu 2019-04-23 o 15:18, ww pisze:
> 
> 3. Na koniec... z czystej ciekawości spytam: czy istnieje jakiś natywny 
> sposób dla ORMa aby usunąć/zaktualizować pole w jakimś rekordzie bez 
> niepotrzebnie generowanego SELECT'a?
> 
> Szukałem po Stack'u lecz wszędzie widziałem jedynie to, że ludzie 
> posługują się SQLem by wykonać DELETE FROM tabela WHERE id=5. ORM wymaga:
> 
> // tu wykonywany jest nadmiarowy select
> $user =$entityManager->find('Users', $id);
> $entityManager->remove($user);
> $entityManager->flush();

a QueryBuilder nie umożliwia 
$em->createQueryBuilder()->delete()->where() lub 
$em->createQueryBuilder()->update() ??
Technical Details
Message-ID: <5cc0011d$0$529$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <q9foak$p72$1@node2.news.atman.pl> <slrnqboo9s.e87.wojciech.bancer@pl-test.org> <5cbf10a8$0$482$65785112@news.neostrada.pl> <q9ngu2$rla$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Subject: Re: Symfony 4 - jak projektować bazę danych
 pod Doctrine?
Newsgroups: pl.comp.lang.php
References: <q9foak$p72$1@node2.news.atman.pl> <slrnqboo9s.e87.wojciech.bancer@pl-test.org> <5cbf10a8$0$482$65785112@news.neostrada.pl> <q9ngu2$rla$1@node2.news.atman.pl>
From: ww <ww@o2.pl>
Date: Wed, 24 Apr 2019 08:24:29 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <q9ngu2$rla$1@node2.news.atman.pl>
Lines: 18
Message-ID: <5cc0011d$0$529$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 213.216.91.73
X-Trace: 1556087069 unt-rea-a-02.news.neostrada.pl 529 213.216.91.73:60935
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit