I’m trying to develop a plugin to manage rentals, and I need to add an isRental boolean to the ProductVariant model. So I’m following these instructions to do so by adding a ProductVariantTrait and ProductVariantInterface. But there must be another missing step, because the trait’s methods are not added to the app’s ProductVariant class (and doctrine:schema:update doesn’t see anything to update).
I can make it work by adding “use ProductVariantTrait” to the app’s ProductVariant class, but editing app code defeats the point of using a plugin. I guess I could create an empty inheritance class in the plugin and include the trait from there… but that defeats the point of using a trait! Is there supposed to be some way of getting the trait included from the plugin config? Has anyone done this successfully? Thanks.