parental
parental copied to clipboard
Using child model from parent.
Hello,
Thank you for the great project. I was trying to to find out what would be a good and clean aproach to retrieve a child model.
I have a user form where I give the user the option to select the type of the model. Then I would like to use that type to create a new entry in the database.
I have set $childTypes in the parent. And I was wondering if I can use it somehow to retrieve the child model I want to use.
I am currently using something like if type==x use child x etc.... I was thinking if there is a better way.