- This topic has 4 replies, 2 voices, and was last updated 19 years, 11 months ago by Riyad Kalla.
-
AuthorPosts
-
haobaba1MemberIs it possible to generate simple java objects from a table definition with the current database tools?
If not this sure would be nice!
Riyad KallaMember1) Open the DB Explorer perspective
2) Connect to your DB
3) Expand the db to show the tables
4) Right click > Generate Hibernate MappingThis will generate Hibernate POJOs with accompanying hbm.xml files describing them and updates your hibernate.cfg.xml file for you.
If you mean just the POJOs themselves without any mapping classes, then no, we don’t just do that… although if you think it is helpful we can certainly look into adding it easily enough.
haobaba1Member@support-rkalla wrote:
1) Open the DB Explorer perspective
2) Connect to your DB
3) Expand the db to show the tables
4) Right click > Generate Hibernate MappingThis will generate Hibernate POJOs with accompanying hbm.xml files describing them and updates your hibernate.cfg.xml file for you.
If you mean just the POJOs themselves without any mapping classes, then no, we don’t just do that… although if you think it is helpful we can certainly look into adding it easily enough.
It would be nice if there was an option to generate POJOS from the table definitions with the ability to specify the package and location.
haobaba1Member@support-rkalla wrote:
1) Open the DB Explorer perspective
2) Connect to your DB
3) Expand the db to show the tables
4) Right click > Generate Hibernate MappingThis will generate Hibernate POJOs with accompanying hbm.xml files describing them and updates your hibernate.cfg.xml file for you.
If you mean just the POJOs themselves without any mapping classes, then no, we don’t just do that… although if you think it is helpful we can certainly look into adding it easily enough.
Actually thinking about it some more it may be appropriate to put this functionality in the new Class dialog by allowing the user to select from databases currently open in the database viewer.
Riyad KallaMemberBoth good suggestions, I will file your comments as an enhancement.
-
AuthorPosts