- This topic has 6 replies, 5 voices, and was last updated 21 years, 1 month ago by Ronald R DiFrango.
-
AuthorPosts
-
Andrew FreemanMemberI would like to be able to view the database schema from within Eclipse, select a table, and then fire up a wizard to build a POJO that is XDoclet enhanced.
NathanMemberi would like to second this opinion!
n.
Scott AndersonParticipantYour ‘+1’ is duely noted. 🙂
–Scott
MyEclipse Support
DeanJonesMemberThe Eclipse JFaceDbc has some of this feature. Configure and point to your database, connect, open the database view and select the Table you want in your schema, place your mouse over the table, and right click, there in a menu option “Export to Hibernate”, it generates your bean and a hbm.xml file in a folder you specify.
thats enough to kinda get started, you’ll have to fix up the keys and associations, and bindings, etc.
then there is a hibernator plugin, this will look at all your hbm.xml files, and generate your tables, indexes, and constraints for you. i’m just getting started with these two tools myself, it’s not perfect, but it’s a jump-start.
Scott AndersonParticipantDean,
Thanks for the recommendations and pointers. As you use the two of these more, if you can think of the “killer” way to tie them together into something cohesive, please let us know. We’re not adverse to borrowing good ideas from our community. 😉
–Scott
MyEclipse Support
DeanJonesMember@scott wrote:
Dean,
Thanks for the recommendations and pointers. As you use the two of these more, if you can think of the “killer” way to tie them together into something cohesive, please let us know. We’re not adverse to borrowing good ideas from our community. 😉
–Scott
MyEclipse SupportWell, the source IS available. 😉 My ultimate goal is to have a UML tool to describe my data model, annotate it with XDoclets ( perhaps aided ) to
generate hbm.xml files and castor mapping XML file for the type. Punch a button, create my data-base. Do a query, serialize to XML, ->XSLT -> HTML, w00t.We have this working on the project I am on, I mean, the pieces, but they were done separately… we actually kinda came in the other way, started with an XSD, used castor to generate the classes. Had a ready made datamodel, generated the castor mappings from JFaceDbc, repaired them and strung the relationships together, and added a BO layer between w/ mappers.
Ronald R DiFrangoMemberAll,
You now have another vote for a good Hibernate plugin.
I am currently using the Hibernate – Middlegen plugin to generate this stuff. You can find it at:
http://www.hibernate.org/98.html
It sounds very similiar to the JFaceDbc, but it may be a lot closer to completion. Also, it is supported directly by the Hibernate team and works as an ANT plugin.
Thanks,
Ron
-
AuthorPosts