Closed m3nu closed 6 years ago
How I am implementing it:
if '.' in field_name:
field_name = field_name.replace('.', '_')
Then in fields.yml
seller_name: # for seller.name
_path:
...
I have made nested attributes for seller.name
, seller.country
and similarly for buyer. What else should I add?
@m3nu should I add more fields in the similar manner as mentioned above, or should this be done differently?
We could simply call our nested fields seller_name
, seller_country
, etc. So use the underscore directly instead of the dot. This would save the trouble of replacing it.
Some invoice attributes, like buyer and seller would benefit from a nested structures. Like
seller->country
. I suggest to user a dot as separator to add "fake" nesting. I didn't find a good way to nest it natively without too many changes.Example:
factx['seller.country']
Steps to implement:
fields.yml