Nowe posty

xx Problem ze sterownikami. (5)
2024-04-13, 21:25:16
xx Instalacja xfce4 (2)
2024-04-13, 16:20:17
xx Serie kompilacji bez instalacji dla “emerge” w Gentoo (2)
2024-04-08, 18:40:04
xx Plasma 6 w Neonie ssie trochę mniej ... (17)
2024-04-05, 10:03:46
xx Problem z Linux Lite po instalacji (3)
2024-04-03, 14:23:40
xx Jak właczyć num locka przy starcie systemu debian 12? (12)
2024-04-02, 17:43:54
xx Brak dźwieku w systemie. (5)
2024-04-02, 16:13:41
xx Dystrybucja pod HP Omen (7)
2024-03-29, 11:33:05
xx [Poradnik] Wyszukiwanie Sterowników (2)
2024-03-27, 21:08:23
xx Ile pingwinów? (1)
2024-03-27, 08:59:24

Autor Wątek: Schema.yml - symfony + doctrine  (Przeczytany 4595 razy)

  • Gość
Schema.yml - symfony + doctrine
« dnia: 2010-11-01, 13:15:39 »
Mam pytanie: tworząc plik schema.yml dla mojej strony w symfony, zauważyłem, że nie ma czegoś takiego jak foreignTable (to chyba jest dla propel). Gdzie zatem umieszczana jest informacja do której tabeli jest tworzona relacja:

Mój plik schema.yml:

HumanIndex:

   actAs: { Timestampable: ~ }
   columns:
      name:        { type: string(255), notnull: true, unique: false  }
      last_name:   { type: string(255), notnull: true, unique: false  }
      birth_date:  { type: date, notnull: false, unique: false }
      death_date:  { type: date, notnull: false, unique: false }
      father_id:   { type: integer, notnull: false, unique: false }
      mother_id:   { type: integer, notnull: false, unique: false }
      home_adress: { type: string(4000), notnull: true, unique: false }
      last_adress: { type: string(4000), notnull: false, unique: false }
      eye_color:   { type: string(16), notnull: false. unique: false }
      height:      { type: integer, notnull: false, unique: false }
      race:        { type: string(255), notnull: false, unique: false }
      personality: { type: string(4000), notnull: false, unique: false }

   relations:
      HumanIndexFather:
         class:        HumanIndex
         local:        father_id
         foreign:      id
         foreignAlias: FatherHumanIndex
         onDelete:     SET NULL
      HumanIndexMather:
         class:        HumanIndex
         local:        mother_id
         foreign:      id
         foreignAlias: MotherHumanIndex
         onDelete:     SET NULL
2) Czy relacje są tworzone dobrze?

Powinno być

HumanIndex.mother_id -> HumanIndex.id
HumanIndex.father_id -> HumanIndex.id

3) Dlaczego jak wywołam sobie coś takiego jak:

./symfony generate:module HumanIndex

to stworzy mnie moduł bez żadnych akcji podstawowych jak index, list, edit, view?

Co robie źle?