The version number is generated by the Java or oracle, the following v1.0, v1.1, v1.2... Is at the end of the v1.9 v2.0, generated after the version number will exist inside a field, or Java with oracle, (only want to go to every time to generate the database check inside, and then manually add 0.1) is there a better way to ah, you requested.
CodePudding user response:
to a big ah
CodePudding user response:
Using Java to write a method to remove the oracle table fields below and then numerical after add 0.1 in deposited in the oracle database
CodePudding user response:
The
refer to the original poster XLS, reply: version number is generated by the Java or oracle, the following v1.0, v1.1, v1.2... Is at the end of the v1.9 v2.0, generated after the version number will exist inside a field, or Java with oracle, (only want to go to every time to generate the database check inside, and then manually add 0.1) is there a better way to ah, your bosses. Id on the variables, a variable is added in the entity id value + 9 divided by 10, as the version number in the database, CodePudding user response:
The version number can be placed inside the redis, periodically synchronize to the database, and use it every time you directly from the redis CodePudding user response:
reference qq_39936465 reply: 3/f Quote: refer to the original poster XLS, reply: version number is generated by the Java or oracle, the following v1.0, v1.1, v1.2... Is at the end of the v1.9 v2.0, generated after the version number will exist inside a field, or Java with oracle, (only want to go to every time to generate the database check inside, and then manually add 0.1) is there a better way to ah, your bosses. Id on the variables, a variable is added in the entity id value + 9 divided by 10, as the version number in the database, Uh huh, also like you do now, got a oracle sequence, starting from 10, each time sequence is divided by 10 CodePudding user response:
select 'V' | | to_char (1 + (SEQ_COLUMN. Nextval * 0.1), 'FM999999999999990.0') The from dual; SEQ_COLUMN for oracle sequence, build a step length of 1 line, according to the business to modify, CodePudding user response:
Sequence is divided by 10 the most reasonable CodePudding user response:
refer to 7th floor maradona1984 response: sequences divided by 10 most reasonable But found in sequence will have a problem, if I remove one sequence, then an error when inserted into the table, then use the time of this sequence will skip the previous version CodePudding user response:
refer to the eighth floor XLS, reply: Quote: refer to 7th floor maradona1984 response: sequences divided by 10 most reasonable But found in sequence will have a problem, if I remove one sequence, and then an error when inserted into the table, in the time of this sequence will skip the last version Indeed may appear this kind of problem, if worry, can use a database to simulate sequence, only it's rather trouble, then it is better to use your previous plan, of course, if concurrent is higher, the want to do a good job is not easy