You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/27 13:59:00 UTC

[jira] [Created] (OFBIZ-13760) Add static factories for ModelEntity and ModelViewEntity and deprecate their public constructors

Mridul Pathak created OFBIZ-13760:
-------------------------------------

             Summary: Add static factories for ModelEntity and ModelViewEntity and deprecate their public constructors
                 Key: OFBIZ-13760
                 URL: https://issues.apache.org/jira/browse/OFBIZ-13760
             Project: OFBiz
          Issue Type: Sub-task
          Components: framework/entity
    Affects Versions: Upcoming Branch
            Reporter: Mridul Pathak
            Assignee: Mridul Pathak


The ModelEntity and ModelViewEntity constructors call the overridable populateBasicInfo() and setEntityName(), and pass this to ModelField.create().

* New factories: createFromXml and createFromDatabaseMetaData on ModelEntity, createFromXml and createFromDynamicView on ModelViewEntity. They take an EntityAttributes value object, and the constructors only assign fields.
* The public constructors are deprecated and will be removed in phase 3.
* A committed snapshot test compares the old and new code paths for every entity and view entity: toXmlElement output, field order, primary keys, auto-stamp fields and relations.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)