My store has many GroupProduct and each one has many virtual products. This virtual products have custom attributes and some are required and some aren't.
[MyModule]/Setup/InstallData.php
The goal is to save some of the product attributes in sales_order_item table.
product attribute -> quote_item -> sales_order_item
When the GroupProduct is added to the cart the observer assigned to the event sales_quote_item_set_product is being executed for each item.
Then when I try to get a product attribute that is not required with the method $observer->getProduct()->getData('iesep_idioma') I get a null value. If I try to get an attribute that is required I do get the value.
How do I load the attributes that I need without loading the whole object?
[MyModule]/etc/events.php
[MyModule]/Observer/salesQuoteItemSetCustomAttribute.php