Open sirex opened 8 months ago
d | r | b | m | property | type | ref | source | prepare example | | | | | | | Translation | | id | translations | | | | | id | integer | | id | | | | | lang | string | | lang | | | | | name | string | | name | | | | | city_id | integer | | city_id | | | | | | | | | | | | City | | id | cities | | | | | id | integer | | id | | | | | en | ref | Translation[city_id,lang] | | id, "en" | | | | name_en | string | | | en.name | | | | lt | ref | Translation[city_id,lang] | | id, "lt" | | | | name_lt | string | | | lt.name
This should generate following query:
SELECT cities.id translations.name FROM cities LEFT JOIN translations ON ( translations.city_id = cities.id AND translations.lang = "en" )
This should generate following query:
Related