aspose file tools*
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 Soft Skills this week in the Jobs Discussion 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
Author

Create Database DTO classes from SQL file

Niall Loughnane
Ranch Hand

Joined: Dec 07, 2006
Posts: 208
Hi,

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,

Niall
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1680
    
    7

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:

http://www.wikihow.com/Generate-Hibernate-Pojo-Classes-from-DB-Tables


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