![]() |
![]() ![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 237 Pomógł: 17 Dołączył: 1.11.2007 Skąd: Zielona Góra Ostrzeżenie: (0%) ![]() ![]() |
Jako ze Propel nie radził sobie z niektórymi zapytaniami zainstalowąłem plugin DbFinderPlugin i mam jeden problem mianowicie mam taki schemat bazy danych:
city: id: ~ name: { type: varchar(200), required: true } slug: { type: varchar(220) } city_gallery: id: ~ city_id: { type: integer, foreignReference: id, foreignTable: city, onDelete: cascade, onUpdate: cascade, required: true } name: { type: varchar(200), required: true } i chwiałbym powiązać to ze sobą w ten sposób : $this->comments=$comments = DbFinder::from('City')-> with('CityGallery')-> find(); niby zapytanie wykonuje się tak jak bym chciał ale mam problem żeby wyświetlić wynik zapytania i wyciągnąć dane z tabeli CityGallery Próbowałem coś takiego getCityGalleryRelatedByCityId()->getId() ale nie trybi. Wiem że mógł bym dac zapytanie : $this->comments=$comments = DbFinder::from('CityGallery')-> with('City')-> find(); I nie było by problemu ale zależy mi żeby zrobić to wg pierwszego sposobu. |
|
|
![]() ![]() |
![]() |
Aktualny czas: 24.08.2025 - 22:38 |