What are the Java code generation persistence frameworks? Something that's "database first" instead of object model first? I understand this really is most likely heresy within the Java world, I'd much like to understand if any frameworks such as this exist.
I am much more of b .Internet guy nowadays. The like the .Internet-side tools like .Internet Tiers or CSLA spring to mind.
sure, hibernate and netbeans for instance can reverse engineering a database. You might be want to check out:
- Hibernate Tools site in maintenance
- netbeans, with recent version of netbeans you may create JPA organizations from the JDBC connection
My 2 cents.
Most of the Java-based persistence tools include tools to create code based on a current schema. Netbeans will generate JPA (including Session bean facades, if preferred). Similarly, JBoss Tools for Eclipse will generate Hibernate JavaBeans for you personally based on a current schema.
I would suggest HiberObjects. This is an Eclipse wordpress plugin you can use to model persistent objects or reverse engineer a current database. The actual way it allows you place up unit tests is really awesome. You may also modify how for example DAO courses are produced: just modify a Groovy script and all sorts of DAO-courses are re-produced. I've experienced a couple of bugs, however the guy behind it's been very responsive and launched fixes in a nutshell time. An account and user rankings/surveys are available at Eclipse Plugin Central.
I developed jOOQ to exactly meet your requirements - so don't be concerned concerning the heresy :-)
- It creates source code
- It stays near to SQL by supplying a SQL-like DSL in Java
- It supports quick access vendor-specific features, for example UDT's, saved methods
- It supports all advanced SQL features, for example UNIONs, nested Chooses, aliasing, etc
Observe that jOOQ is NOT really an OR-mapper. It concentrates on the relational datamodel out of your RDBMS and does not provide you with the possible ways to make your custom object-oriented domain model like Hibernate or JPA do. This really is precisely for that reason you pointed out yourself:
Something that is "database first" rather than object model first
DB Importer is definitely an Eclipse plug-for the reason that creates JPA classes from the database.
Disclaimer: I'm the creator of DB Importer.