jQuery in Action, 3rd edition
The moose likes Object Relational Mapping and the fly likes Create Database DTO classes from SQL file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Create Database DTO classes from SQL file" Watch "Create Database DTO classes from SQL file" New topic

Create Database DTO classes from SQL file

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208

im trying to create Java database DTO bean classes from a SQL file using Maven,

Has anyone recommended Maven tools for doing this or otherwise?

Thanks in Advance,

Bill Gorder

Joined: Mar 07, 2010
Posts: 1682

You would not do it from the SQL file but rather from a running database.

Hibernate tools claims to do this, but I personally have had mixed success with it in the past. It can usually give you a starting point to start tweaking from though:


The Spring Roo project does a much better job of it, but its not as straight forward to use if you are not familiar with Roo. Once again you will still most likely need to tweak a few things but most likely fewer than if you used Hibernate tools as the mappings it generates seems to be more sensible.

[How To Ask Questions][Read before you PM me]
I agree. Here's the link: http://aspose.com/file-tools
subject: Create Database DTO classes from SQL file
It's not a secret anymore!