Domain classes
1. [constrants] - If the id is auto generated , add the generator: "assigned"
constrain to id field
2. [mappings] - Make sure to add the table name in the mapping
3. [mappings] - If the id is auto generated type, add the generator: "increment" mapping
4. [mappings] - Must add the column name mapping. Character case is not important.
eg : name column: "name" can map to a 'NAME' column in oracle.
5. [mapping] - If there are any join tables, add the relevant mapping.
6. When giving names for the column names, remember that the maximum character length for oracle is 30.
6. When giving names for the column names, remember that the maximum character length for oracle is 30.
Services
Usually database transactions are done in the service layer. Few things to be remembered when writing your code to be compatible with both databases are listed below.
1. If you are creating new database entries, first create the entry without setting foreign dependencies, then make sure to save the object first and then set the other foreign dependencies to the saved and again obtained object.
Ref - Change Schemas online - http://www.sqlines.com/online
Ref - MySQL to Oracle Migration - http://www.sqlines.com/mysql-to-oracle
No comments:
Post a Comment