Closed jasonvarga closed 1 year ago
That would work but it would mean we also need to re-save any localisations when the origin is saved so the new values propagate.
The only other option I can think of is updating the query builder to also look for values on the parent (using ->whereHas()
or something similar). But that would get messy.
I'd be fine with saving dependents.
On localized entries, any fields that you don't choose to localize will fall back to what's in the origin. That's fine.
However if you try to perform a query on one of these fields, the localized versions will not appear.
For example: (using yaml to represent the rows, obviously in eloquent it's stored differently)
In the Stache driver it works fine because the indexes/columns are generated on the fly.
An idea: store all the data so it's queryable, but also store something like
localized_keys
so we can work out what goes in$entry->data()
when we build the objects.