Details
-
Type:
Improvement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Complete
-
Affects Version/s: 1.2.2.RELEASE
-
Fix Version/s: None
-
Component/s: @ CORE, PERSISTENCE
-
Labels:
-
Environment:Ubuntu 12.04, JDK 1.6.0_33, Maven 3.0.4, Oracle 10.2.0.4
Description
Problem: When "database reverse engineer" the application may not work because there are some behaviors we can't control:
- With all persistence providers, identifier generator fails because sequence not exists in database.
- A table with a column named "version" is configured as concurrency control property when is not (even not numeric).
Solution: Create "database reverse engineer" command new options to control this behaviors:
- disableVersionFields (optional, default false): If true, don't add concurrency control feature to version field and generate field as other fields. All entities will have versionField="" attribute in RooJpaActiveRecord annotation.
- disableGeneratedIdentifiers (optional, default false): If true, don't add generated value feature to identifier field and add field into create view (required and i18n). All entities will have sequenceName="" attribute in RooJpaActiveRecord annotation. This modification allows to disable generated identifiers into direct engineer setting versionField="" attribute in RooJpaActiveRecord annotation too.
I attach a patch with this solution diffs.
This solution has been tested.
Attachments
Issue Links
- is duplicated by
-
ROO-3281 Reverse engineering a database table with version column name when is not a @Version
-
- Resolved
-