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
kurtguenther
5 Post subject: Newbie: How do I add a mapping to hibernate.cfg.xml  PostPosted: Dec 06, 2004 - 07:07 PM
Registered Member
Registered Member


Joined: Sep 21, 2004
Posts: 4

I see the big warning in the hibernate.cfg.xml about generated code, but how do I add a new object mapping to this file?

I generated the 'Item.hbm.xml', and I've rebuilt the project, but I'm not sure how to regenerate this xml file.

Thanks in advance, Kurt

--Kurt
 
 View user's profile Send private message  
Reply with quote Back to top
support-jeff
Post subject:   PostPosted: Dec 07, 2004 - 12:30 AM
Moderator
Moderator


Joined: Jul 18, 2004
Posts: 357

Should be automatically updated for you, unless you specifically uncheck the "update config" option when creating a mapping from a table.

jeff

_________________
jeff
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
davesb
Post subject: Any more details....  PostPosted: Dec 21, 2004 - 03:10 PM
Veteran Member
Veteran Member


Joined: Feb 16, 2004
Posts: 17

I'm a newbie to this too - could someone detail what triggers a regeneration of the code (is it changes to the database?) and what would be a "best practice" approach to starting and maintaining an application using Hibernate. The only examples I can find seem to be very simple 1 table 1 form ones where the advantages of using code generation tools are minimal.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Dec 21, 2004 - 04:09 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

dave,
The updated generation are invoked by you going back to the DB Explorer and requesting new mappings be generated when your DB structure changes. This will generate the mapping files and update the hibernate.cfg.xml file for you.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
rdclark
Post subject:   PostPosted: Dec 27, 2004 - 11:41 PM
Veteran Member
Veteran Member


Joined: Nov 05, 2004
Posts: 3

It would help if you also documented a procedure (even if it's "disregard the warning and update manually") for those who generate their mappings via XDoclet (e.g. for Hibernate.)

Not everybody uses the database explorer. In fact, Mac OS X users are still waiting for it.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-greg
Post subject:   PostPosted: Dec 28, 2004 - 12:08 AM
Moderator
Moderator


Joined: Mar 31, 2004
Posts: 1612

rdclark wrote:
It would help if you also documented a procedure (even if it's "disregard the warning and update manually") for those who generate their mappings via XDoclet (e.g. for Hibernate.)

We will look into documenting this procedure as you suggest. In the future, we plan on delivering more advanced Hibernate tools so that is where our documentation efforts will be focused. We certainly understand that some users will always use XDoclet that is why we will continue to support and enhance our xdoclet support in the future as well.
rdclark wrote:

Not everybody uses the database explorer. In fact, Mac OS X users are still waiting for it.

The only part of the DBexplorer that currently isn't supported on OS X is the new ERD designer. All of the other Database Explorer features are available on the Mac platform.

_________________
Greg
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