I wanted to use this code
But when document wasn't found, it was created without relations. for_customer and cart are scopes. orders is has_many relation to eshop. eshop_id was nil and customer_id was also nil. Cart is state for order. It was also in blank state.
I'm using this syntax now to avoid this:
And it works.
Same behaviour is for.
I'm not sure if this is bug or expected behaviour.
Can anyone decide?