Hi Dennis.
First I've the same problem than yours for the "Object class ... could not 
be converted to string" and I don't arrive to solve it ^^

Secondly, for the association beetween your "host" entity and your "Systems" 
is done by Doctrine, in Symfony 2.
If you've generated your entities with Doctrine command-lines (like "php 
app/console doctrine:generate:entity entityName") and generated
your database-schema with it too, so you can make associations very easily.

1 - You've to create a "ManyToOne" association between your Host and System 
entities. 
To do it here are some good links :
Symfony 2 Doctrine tutorial<http://symfony.com/doc/current/book/doctrine.html>
Doctrine association 
tutorial<http://www.doctrine-project.org/docs/orm/2.0/en/reference/association-mapping.html#one-to-many-bidirectional>-
 One to many associations


2 - After you've created your entities and made your annotations (or YAML / 
XML) metadatas, you've to create correctly your form making "entity-links"
To make it, create an "entity" field in your form which will search your 
entities automaticaly in the database.
To do it here is a good link :
Symfony 2 - Form tutorial / Embedded 
form<http://symfony.com/doc/current/book/forms.html#embedding-a-collection-of-forms>

Normally, your entities will automaticaly appear in the form and the link in 
the database will be automatically created by Doctrine (with 
association-tables).
But you've to generate correctly your classes with doctrine in Symfony 2

-- 
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