moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
279 stars 199 forks source link

Can the entity XML function be improved? #595

Open daiagou opened 1 year ago

daiagou commented 1 year ago

Background: Mobi's SQL operations can be replaced by XML, either DDL or DML. This is great. But the problem is that it is not perfect. We still need to use SQL for many functions. Part of the XML and part of the SQL clearly impose an additional burden on operations and maintenance. Specifically, let me list the situations that are currently not supported:

  1. Flexible adjustment of field length. For example, if my varchar defaults to 40 and I need to adjust it to 32, I need to configure a '<dictionary-type type="varchar32" java-type="java.lang.String" default-sql-type=“VARCHAR(32)"/>' in the configuration file. Once I need to change the configuration, I need to restart the instance, which is obviously not good. Of course, there are usually not many changes in the situation.
  2. Default values are not supported
  3. Does not support self growth
  4. Does not support null or not

My suggestion is to add these support options so that the XML functionality will be more robust, such as: <field name="id" type=“bigint” length=“20” defalut-value=“0” not-null=“true” auto-inc=“true" is-pk="true"/>