Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony][Symfony2][SF2] Alternatywa dla StofDoctrineExtensionsBundle Translatable
404
post
Post #1





Grupa: Zarejestrowani
Postów: 226
Pomógł: 25
Dołączył: 22.05.2011

Ostrzeżenie: (0%)
-----


Witam,

szukam alternatywy dla StofDoctrineExtensionsBundle, a dokładniej mówiąc dla rozszerzenia Translatable. W Google nie znalazłem żadnego rozwiązania, które by mi odpowiadało dlatego myślę o czymś własnym.

Przykładowa struktura tabel:
Kod
* language
language_id
language_name
language_code

* country
country_id
country_name
country_name_alias

* country_tranlation
country_translation_id
country_translation_language_id
country_translation_country_id
country_translation_country_name
country_translation_country_name_alias

Zapytanie, które wyciągnie mi wszystkie rekordy na podstawie _locale:
  1. SELECT * FROM country
  2. INNER JOIN country_tranlation ON country_tranlation.coutnry_translation_country_id = country.country_id
  3. INNER JOIN LANGUAGE ON LANGUAGE.language_id = country_tranlation.country_translation_language_id
  4. WHERE anguages.language_code = 'pl'
Problem w tym jak ten cały proces zautomatyzować do tego stopnia:
  1. $country = $countryRepository->find(1);
...zamiast...:
  1. $country = $countryRepository->findByIdAndLanguageCode(1, 'pl');
Czy sam listener wystarczy?

Ten post edytował 404 5.10.2014, 18:20:04
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 10:03