Issue background:
This project belongs to the SSH project, and the persistent Layer relational database framework is hibernate. The foreground passes all parameters and parameter values to the background by serializing the form.
Expected effect:
Set the initial value of the field for some number types in the database table to 0.0, and if the foreground form does not populate those fields, the value of the field for these number classes will be the default value 0.0 when the add operation is performed.
Actual effect;
After you perform the add operation, the value of the field of type number is empty, not 0.0
Solve the problem:
Problem with invalid database default property
How to resolve:
In the mapping file *.hbm.xml <class name= ..... dynamic-insert= "true">
Solution principle:
Dynamic-insert= "True, the dynamically generated SQL statement executes, and if the value of the property is null the null field will no longer appear in the dynamic SQL statement, guaranteeing the efficiency of SQL execution.
Extended:
Dynamic-update= "True" is also a dynamically generated SQL statement, and only the properties that you modify will appear in the SQL statement.
Adaptation Range:
A lot of the database table fields are used to help commit SQL statements to run efficiently.
Resolves an issue in which the database default property is invalid