This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfPropelORMPlugin: problem with many-to-many in admin form

Ask help about existing plugins, or find advice about the way to build up your own.

sfPropelORMPlugin: problem with many-to-many in admin form

by theG » Sat Dec 17, 2011 8:22 pm

Hello,

I want to edit the related instances within an admin form.
So I used the example from sfPropelORMPlugin doc/schema.md to configure my many-to-many relationship:

Code: Select all
    [yml]
    propel:
      blog_article:
        # columns definition

      blog_author:
        # columns definition

      blog_article_author:
        _attributes: { phpName: ArticleAuthor, isCrossRef: true }
        article_id:  { type: integer, foreignTable: blog_article, foreignReference: id, onDelete: cascade }
        author_id:   { type: integer, foreignTable: blog_author, foreignReference: id, onDelete: cascade }


But if I try to embed blog_author within blog_articles form I get the following error:
Calling getRelation() on an unknown relation, Artist

I tried to embed the form like it's described in sfPropelORMPlugin doc/form.md:

Code: Select all
$this->embedRelation('blog_author');


Where is the mistake?

Thanks in advance!
Gerrit
theG
Junior Member
 
Posts: 4
Joined: Tue Sep 13, 2011 4:39 pm