Hi ! Does anyone knows how can I have a relation 1 to many in doctrine but in this special way:
in my principal table I have some fields, almnost none of them are fields which could have translations
Table1:
table_id <- primary key
numeric_field1
numeric_field1
numeric_field3
now in my Table1_translations I have all the fields which could be translated
Table2:
table_id <- primary key along with language
language <- this contains 2 letters representing which language is being stored in this row
string_field1
string_field2
string_field3
I've got a simple idea on how to represent this with YAML, but my question would be, how can I retrieve this data?
Table1:
table_id numeric_field1 numeric_field2 numeric_field3
1 123 321 415
Table2
table_id language string_field1 string_field2 string_field3
1 en hello happy world
1 es hola feliz mundo
So, for row with table_id=1 I have 2 rows in table2 which correspond to the strings each in a different language (en & es) with this im trying to manage some sort of localization but on the database since these could be texts
thanks in advance :)