Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [Symfony]Problem z tablicą wiele do wiele
Fallen
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 24.11.2008

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


Mam problem, posiadam tablice clients oraz subkeywords a pomiędzy nimi clienthassubkeywords.
Staram sie napisać w admin generator aby wyświetlani byli klienci oraz ich słowa kluczowe i coś mi nie idzie :/

generator:
class: sfPropelAdminGenerator
param: model_class: Clients
theme: default
fields:
username: {name: username}
pass: {name: pass}
description: {name: description}

I to działa smile.gif Ale kiedy dopisuje:

clients_subkeywords: { type: admin_double_list, params: through_class=ClientHasSubkeywords }

Nie chce mi wyświetlić w tabeli subkeywordów(ogólnie tabeli pośredniczącej) :/
Jak to zrobić korzystając z generatora?

Dorzucam schemat bazy(może coś źle pisze?):
client_has_subkeywords:
clients_client_id:
type: INTEGER
required: true
primaryKey: true
subkeyword_id:
type: INTEGER
required: true
primaryKey: true
_foreignKeys:
- foreignTable: clients
onDelete: cascade
references:
- { local: clients_client_id, foreign: client_id }
- foreignTable: subkeywords
onDelete: cascade
references:
- { local: subkeyword_id, foreign: subkeyword_id }

clients:
_attributes:
idMethod: native
client_id:
type: INTEGER
required: true
autoIncrement: true
primaryKey: true
pass:
type: VARCHAR
size: 255
username:
type: VARCHAR
size: 255
description:
type: VARCHAR
size: 255

subkeywords:
_attributes:
idMethod: native
subkeyword_id:
type: INTEGER
required: true
autoIncrement: true
primaryKey: true
keyword:
type: VARCHAR
size: 255
Go to the top of the page
+Quote Post

Posty w temacie


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: 21.08.2025 - 07:57