I'm not sure, but I think you'll have to make a list of inherited/
child classes by yourself.


On 24 ún, 11:11, "m.s." <marco.schierh...@googlemail.com> wrote:
> I just started to use symfony 1.4 and Doctrine. (Used 1.0 - 1.2 +
> Propel a lot before).
> I thought to give Doctrine a try, because of the fast and huge
> Development process in the past.
> Thanks to jwage ;-)
>
> Im using Table Inheritance. This is a small portion of my schema.yml:
>
> Articles:
>   columns:
>     id:
>       type: integer(4)
>       primary: true
>       notnull: true
>       autoincrement: true
>     marken_id:
>       type: integer(4)
>       notnull: false
>     user_id:
>       type: integer(4)
>       notnull: false
>     address_id:
>       type: integer(4)
>       notnull: false
> ...
> Vehicles:
>   inheritance:
>     extends: Articles
>     type: concrete
>
> Rennfahrzeuge:
>   columns:
>     stvo:
>       type: boolean
>       notnull: false
>       default: false
>   inheritance:
>     extends: Vehicles
>     type: concrete
> Tourenwagen:
>   inheritance:
>     extends: Rennfahrzeuge
>     type: column_aggregation
>     keyField: type
>     keyValue: 1
> ...
> Sonstige:
>   inheritance:
>     extends: Rennfahrzeuge
>     type: column_aggregation
>     keyField: type
>     keyValue: 6
>
> Karts:
>   inheritance:
>     extends: Vehicles
>     type: concrete
> TonyKart:
>   inheritance:
>     extends: Karts
>     type: column_aggregation
>     keyField: type
>     keyValue: 1
> ...
> Sonstige:
>   inheritance:
>     extends: Karts
>     type: column_aggregation
>     keyField: type
>     keyValue: 9
>
> Im now thinking of using a simple way to create a the right form.
> The user should have to select fields at the top of the form (like you
> can see here  :http://msm-esv.dyndns.org/frontend_dev.php/fahrzeuge/insert
> )
>
> You should choose the "parent class" like Rennfahrzeuge or Karts and
> so on.
> After that the user should choose the child class like Tourenwagen or
> Sonstige.
> Then the page should reload and display the right form.
>
> Is there any function in Doctrine to get the inheritated/child classes
> for displaying them in the second select field?
> (e.g. Rennfahrzeuge has Tourenwagen,..,..., Sonstige and Karts has
> TonyKart,...,...,Sonstige)
>
> After that i could create dynamically the assigned form class like:
>
> $chooseMode      = $request->getParameter('chooseMode').'Form';
> $modeFormClass = new $chooseMode();
>
> or i have thought about just setting the right model in the parent
> form class.
>
> What are your thoughts? I would really appreciate any suggestions and
> help :-)
>
> Thanks a lot,
> Marco

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