You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm currently creating a random name generator to teach myself Symfony. However, I've run into an issue that I can't work through by myself.
The generator will produce a series of names, from a predefined list, based on a series of criteria: gender, culture, and social status.
My entities/tables:
name
gender
culture
social status
My original many-to-many relationships:
name-gender
name-culture
name-social status
I finished the controllers/forms/types for adding the necessary data, as well as outputting them (both singularly and as a list), before I realised I had made mistake. I needed the social status linked to the culture. Adding a many-to-many relationship between culture and social status seemed appropriate, but that’s where I became stuck. How do I do the name form? Do I need to resort to using javascript to populate the select or can Symfony manage by itself?
Part of the issue is that it’s possible for each name to have multiple cultures and a subsequent social statuses (and genders). My code currently allows for multiple choices for culture and social status, but how do I link them so that a choice of each culture must be made before any social statuses can be chosen?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm currently creating a random name generator to teach myself Symfony. However, I've run into an issue that I can't work through by myself.
The generator will produce a series of names, from a predefined list, based on a series of criteria: gender, culture, and social status.
My entities/tables:
My original many-to-many relationships:
I finished the controllers/forms/types for adding the necessary data, as well as outputting them (both singularly and as a list), before I realised I had made mistake. I needed the social status linked to the culture. Adding a many-to-many relationship between culture and social status seemed appropriate, but that’s where I became stuck. How do I do the name form? Do I need to resort to using javascript to populate the select or can Symfony manage by itself?
Part of the issue is that it’s possible for each name to have multiple cultures and a subsequent social statuses (and genders). My code currently allows for multiple choices for culture and social status, but how do I link them so that a choice of each culture must be made before any social statuses can be chosen?
Cheers!
Beta Was this translation helpful? Give feedback.
All reactions