MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
haobaba1
Post subject: Generating Data Objects From table?  PostPosted: Dec 15, 2004 - 03:52 PM



Joined: Sep 01, 2004
Posts: 33

Is it possible to generate simple java objects from a table definition with the current database tools?

If not this sure would be nice!
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Dec 15, 2004 - 04:46 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

1) Open the DB Explorer perspective
2) Connect to your DB
3) Expand the db to show the tables
4) Right click > Generate Hibernate Mapping

This 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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
haobaba1
Post subject:   PostPosted: Dec 15, 2004 - 08:53 PM



Joined: Sep 01, 2004
Posts: 33

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 Mapping

This 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.
 
 View user's profile Send private message  
Reply with quote Back to top
haobaba1
Post subject:   PostPosted: Dec 15, 2004 - 08:57 PM



Joined: Sep 01, 2004
Posts: 33

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 Mapping

This 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.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Dec 15, 2004 - 10:02 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Both good suggestions, I will file your comments as an enhancement.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits