资 源 简 介
Point this tool at your database to map from your relations to JPA and JAXB classes. However, it is designed specifically to work well with databases where a certain number of best practices are adhered to:
Every table should have a primary key named "id" that auto-increments on insert
Foreign key columns must be named tablename_id
Many to Many join tables must be named tablename1_tablename2
All foreign keys should be declared in the database
If you can live by these rules you will never have to write JPA classes again. Here is the usage message:
Usage: com.moonspider.dbmap.GenerateConfig -type (-t) [String] The type to generate, either "jpa" or "gorm" (experimental) (jpa) -destinationDirectory (-d) [String] Destination directory -url [String] The url of the database -pkg (-package) [String] The target package () -user (-u) [String] Database user (sa) -password (-p) [String] Database password () -globalEx