Robert Stewart
09/23/2021, 5:57 PMSpree::Product (do not provide a name)
• create a valid Spree::Variant, assign this as master to the product
• call save! on the variant
The variant will be saved with an empty product, instead of both failing validation.
Doing the reverse, calling save! on the invalid product will fail both, leaving neither persisted to the database.
This seems to follow the (implied) guidance for autosaving associations that saving the parent end of the relation will save the children (but apparently not the reverse.)
Not sure whether that is worth documenting or adjusting, but thought it was worth sharing here.kennyadsl