![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 2 291 Pomógł: 156 Dołączył: 23.09.2007 Skąd: ITALY-MILAN Ostrzeżenie: (10%) ![]() ![]() |
Witam mam maly problem potrzebuje usunac wszystkie tlumaczenia z gedmo gdy usuwam jakis rekord.
Problem polega na tym ze nie moge uzywa dotakowych repozytoriow ani encji. Wiec takie rozwiazanie odpada:
Poki co probowalem tak:
W translations znajduje sie: Kod Array ( [0] => Gedmo\Translatable\Entity\Translation Object ( [id:protected] => 1 [locale:protected] => pl_PL [objectClass:protected] => Meritoo\Cmf\PagesContentBundle\Entity\PagesContent [field:protected] => title [foreignKey:protected] => 1 [content:protected] => Strona główna ) [1] => Gedmo\Translatable\Entity\Translation Object ( [id:protected] => 3 [locale:protected] => en_GB [objectClass:protected] => Meritoo\Cmf\PagesContentBundle\Entity\PagesContent [field:protected] => title [foreignKey:protected] => 1 [content:protected] => Strona główna ) [2] => Gedmo\Translatable\Entity\Translation Object ( [id:protected] => 5 [locale:protected] => de_DE [objectClass:protected] => Meritoo\Cmf\PagesContentBundle\Entity\PagesContent [field:protected] => title [foreignKey:protected] => 1 [content:protected] => Strona główna ) [3] => Gedmo\Translatable\Entity\Translation Object ( [id:protected] => 7 [locale:protected] => fr_FR [objectClass:protected] => Meritoo\Cmf\PagesContentBundle\Entity\PagesContent [field:protected] => title [foreignKey:protected] => 1 [content:protected] => Strona główna ) [4] => Gedmo\Translatable\Entity\Translation Object ( [id:protected] => 9 [locale:protected] => en_US [objectClass:protected] => Meritoo\Cmf\PagesContentBundle\Entity\PagesContent [field:protected] => title [foreignKey:protected] => 1 [content:protected] => Strona główna ) ) Czyli mamy encje Translation wiec dlaczego remove nie dziala? Zero bledow kompletnie nic a w bazie tlumaczenia dalej sa. Czy ktos wie jak rozwiazac problem? |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 435 Pomógł: 40 Dołączył: 16.02.2003 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
Skoro masz 'tłumaczalny' model to nie mów, że nie ma on powiązania do encji tłumaczeń mniej więcej takiego:
jeśli tak to usunięcie tej encji (EntityManager::remove(...)) spowoduje usunięcie również powiązanych translations. (zakładając, że masz zdefiniowaną operację kaskadową cascade={"remove"}). Jeżeli tak nie masz to pytanie - czemu? Cytat Problem polega na tym ze nie moge uzywa dotakowych repozytoriow ani encji. Dlaczego? |
|
|
![]() ![]() |
![]() |
Aktualny czas: 16.10.2025 - 23:51 |