java - Change PK type in model classes of Oracle db, generated with hibernate -


i have database on oracle 11 xe , tables have primary keys numeric(22,0). have generated model classes hibernate tools in eclipse. unfortunately, numeric fields have been implemented bigdecimals. fields representing int columns changed too. tried reverse engineering, seems not work in case.

how can fix it?

you better use bigint instead of numeric(22,0) ids. re-generate entities. java-ids should of type long. if not have change type manually. in general should see generated entities more template needs modifications.

reference: mapping sql , java types


Comments