Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony] Podwójna relacja w tabeli
stirith
post
Post #1





Grupa: Zarejestrowani
Postów: 162
Pomógł: 2
Dołączył: 18.01.2008

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


Mam tabele:

Kod
sf_friends:
   className: sfFriends
   columns:
     id:
       type: integer(4)
       primary: true
       autoincrement: true
     id_first_friend:
       type: integer(4)
     id_second_friend:
       type: integer(4)
   relations:
     sfGuardUser:
       local: id_first_friend
       foreign: id_profil
       type: one
       foreignType: many
       foreignAlias: sfFriends
     sfGuardUser:
       local: id_second_friend
       foreign: id
       type: one
       foreignType: many
       foreignAlias: sfFriends



Wszystko działa, poza jednym relacje dodaje tylko dla id_second_friend -> czyli wychodzi na to że tworzy jedną relacje, a później przechodząc do drugiej nadpisuje pierwszą, dopiero zaczynam z doctrine, więc pewnie gdzieś głupi błąd popełniłem, proszę o pomoc

Ten post edytował stirith 14.11.2009, 13:10:06
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
Gribo
post
Post #2





Grupa: Zarejestrowani
Postów: 237
Pomógł: 17
Dołączył: 1.11.2007
Skąd: Zielona Góra

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


nie używam doctrine ale to może być wina tego że nazwy
  1. sfGuardUser
się dubluja nazwij 2 relacje np. sfGuardUser2 zamiast sfGuardUser i sprawdź czy działa
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 15.09.2025 - 19:57