Improved: Replaces ModelInduceFromDb with widgets (OFBIZ-6510)
This is a manual backport of the related two commits in trunk with minor changes to fit the r18.12 codebase.
This commit is contained in:
@@ -1538,6 +1538,25 @@ public class ModelEntity implements Comparable<ModelEntity>, Serializable {
|
||||
return this.toXmlElement(document, this.getPackageName());
|
||||
}
|
||||
|
||||
public Element toGroupXmlElement(Document document) {
|
||||
return this.toGroupXmlElement(document, this.getPackageName());
|
||||
}
|
||||
|
||||
public Element toGroupXmlElement(Document document, String packageName) {
|
||||
if (UtilValidate.isNotEmpty(this.getPackageName()) && !packageName.equals(this.getPackageName())) {
|
||||
Debug.logWarning(
|
||||
"Export EntityModel XML Element [" + this.getEntityName() + "] with a NEW package - " + packageName,
|
||||
module);
|
||||
}
|
||||
|
||||
Element root = document.createElement("entity-group");
|
||||
root.setAttribute("group", packageName);
|
||||
|
||||
root.setAttribute("entity", this.getEntityName());
|
||||
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes entity model information in the Apple EOModelBundle format.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user