Hi!

I'm totally new to symfony and doing my first project. It is a
database of customers ("Kunde") and ways to reach them ("Kontaktweg",
which would be "E-Mail", "Skype", ...). The two tables are linked by a
third one that has the ids of both data sets and the payload
("Inhalt", like "some...@somewhere.com").

This is my schema.yml:

detect_relations: true

Kunde:
  actAs: { Timestampable: ~ }
  columns:
    name: string
    vorname: string
    adresse: string
    plz: integer(5)
    ort: string
    gebdat: date
    notiz: string

Kontaktweg:
  columns:
    name: string

KundeKontaktweg:
  actAs: { Timestampable: ~ }
  columns:
    kunde_id: integer
    kontaktweg_id: integer
    inhalt: string


Now I want the frontend edit form for Kunde to show the possibilities
of Kontaktweg and to allow the generation of said data sets. I thought
ahDoctrineEasyEmbeddedRelations would do that. But I installed it and
put this in KundeForm.class.php:

    $this->embedRelations(array(
      'Kontaktwegs' => array(
        'considerNewFormEmptyFields' => array('inhalt')

This yields the following error message:

500 | Internal Server Error | Doctrine_Table_Exception
Unknown relation alias Kontaktwegs

stack trace
at ()
in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
Doctrine/Relation/Parser.php line 237 ...

            return $this->getRelation($alias, false);

        } else {

            throw new Doctrine_Table_Exception('Unknown relation alias
' . $alias);

        }

    }

at Doctrine_Relation_Parser->getRelation('Kontaktwegs', )
in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
Doctrine/Relation/Parser.php line 235 ...
at Doctrine_Relation_Parser->getRelation('Kontaktwegs', 1)
in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/
Doctrine/Table.php line 1001 ...
at Doctrine_Table->getRelation('Kontaktwegs')
in SF_ROOT_DIR/plugins/ahDoctrineEasyEmbeddedRelationsPlugin/lib/form/
ahBaseFormDoctrine.class.php line 55 ...
at ahBaseFormDoctrine->embedRelations(array('Kontaktwegs' =>
array('considerNewFormEmptyFields' => array('inhalt'))))
in SF_ROOT_DIR/lib/form/doctrine/KundeForm.class.php line 23 ...
at KundeForm->configure()
in SF_ROOT_DIR/lib/form/sfForm.class.php line 70 ...
at sfForm->__construct(array(), array(), null)
in SF_ROOT_DIR/lib/form/addon/sfFormSymfony.class.php line 33 ...
at sfFormSymfony->__construct(array(), array(), null)
in SF_ROOT_DIR/lib/plugins/sfDoctrinePlugin/lib/form/
sfFormDoctrine.class.php line 52 ...
at sfFormDoctrine->__construct()
in SF_ROOT_DIR/apps/frontend/modules/kunde/actions/actions.class.php
line 28 ...
at kundeActions->executeNew(object('sfWebRequest'))
in SF_ROOT_DIR/lib/action/sfActions.class.php line 60 ...
at sfActions->execute(object('sfWebRequest'))
in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 92 ...
at sfExecutionFilter->executeAction(object('kundeActions'))
in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 78 ...
at sfExecutionFilter->handleAction(object('sfFilterChain'),
object('kundeActions'))
in SF_ROOT_DIR/lib/filter/sfExecutionFilter.class.php line 42 ...
at sfExecutionFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/filter/sfRenderingFilter.class.php line 33 ...
at sfRenderingFilter->execute(object('sfFilterChain'))
in SF_ROOT_DIR/lib/filter/sfFilterChain.class.php line 53 ...
at sfFilterChain->execute()
in SF_ROOT_DIR/lib/controller/sfController.class.php line 233 ...
at sfController->forward('kunde', 'new')
in SF_ROOT_DIR/lib/controller/sfFrontWebController.class.php line
48 ...
at sfFrontWebController->dispatch()
in SF_ROOT_DIR/lib/util/sfContext.class.php line 170 ...
at sfContext->dispatch()
in SF_ROOT_DIR/web/frontend_dev.php5 line 13 ...

What am I thinking or doing wrong? I couldn't find a solution
anywhere…

Lots of thanks in advance,

Simon

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to