![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 10 Pomógł: 0 Dołączył: 28.07.2011 Ostrzeżenie: (0%) ![]() ![]() |
Tworzę sobie prosty blog w symfony2 dla przećwiczenia wiedzy (lub niewiedzy), przebrnąłem przez kontrolery i szablony, teraz doszedłem do doctrine. Zrobiłem sobie takie tabelki w yml:
article table Kod tpsa\StoreBundle\Entity\article: type: entity table: null fields: id: type: integer id: true generator: strategy: AUTO description: type: string length: '255' content: type: text length: '65535' created_at: type: datetime length: null updated_at: type: datetime length: null manyToOne: author: targetEntity: user joinColumn: name: user_id referencedColumnName: id manyToMany: tags: targetEnity: tag inversedBy: article joinTable: name: article_tag joinColumns: article_id: referencedColumnName: id inversedJoinColumns: tag_id: referencedColumnName: id lifecycleCallbacks: { } tag table: Kod tpsa\StoreBundle\Entity\tag: type: entity table: null fields: id: type: integer id: true generator: strategy: AUTO name: type: string length: 255 created_at: type: datetime updated_at: type: datetime manyToMany: articles: targetEnity: article mappedBy: tags lifecycleCallbacks: { } Przykład ten robiłem wzorując się na dokumentacji ze strony: [url link="http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html"]5. Association Mapping[/url] Przy generowaniu entities wyskakuje mnie: Cytat [ErrorException] Notice: Undefined index: targetEntity in /var/www/symfony/vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php line 391 Co robie źle? |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 6 476 Pomógł: 1306 Dołączył: 6.08.2006 Skąd: Kraków Ostrzeżenie: (0%) ![]() ![]() |
Znajdź różnice: targetEnity - targetEntity.
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 10 Pomógł: 0 Dołączył: 28.07.2011 Ostrzeżenie: (0%) ![]() ![]() |
Dzięki, znalazłem jeszcze parę literówek ;-)
|
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 17.06.2025 - 20:09 |