| Author |
Message |
|
|
|
Post subject: Newbie: How do I add a mapping to hibernate.cfg.xml
Posted: Dec 06, 2004 - 07:07 PM
|
|
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 |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Dec 07, 2004 - 12:30 AM
|
|
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
|
| |
|
|
|
 |
|
|
Post subject: Any more details....
Posted: Dec 21, 2004 - 03:10 PM
|
|
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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Dec 21, 2004 - 04:09 PM
|
|
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
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Dec 27, 2004 - 11:41 PM
|
|
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. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Dec 28, 2004 - 12:08 AM
|
|
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
|
| |
|
|
|
 |
|
|