data-hub icon indicating copy to clipboard operation
data-hub copied to clipboard

Use factory for Pimcore object type instead static call.

Open vmalyk opened this issue 1 year ago • 1 comments

Hi,

It looks like Document and Asset have factories that generate QueryType and provide the ability to replace and extend entity schema definitions more easily. However, this does not work for Data Objects. I suggest adding a similar approach for Data Objects with its own factory, as we need to pass parameters, context, and class names without breaking the current implementation.

Please review.

vmalyk avatar Oct 22 '24 14:10 vmalyk

Hi @mcop1,

thank you for feedback and I updated factory by using native types. I think it's better leave methods as protected and leave possibility to inherit new classes from factory and leave factory in the consistency with previously added factories.

Please have a look.

vmalyk avatar Oct 25 '24 14:10 vmalyk

Hello @vmalyk agreed, we can keep it consistent. I created a ticket to take a look at the classes and make them final/internal (if it is fitting) for the next major release.

Thank you again for your efforts!

mcop1 avatar Oct 30 '24 07:10 mcop1