-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: cfg2hbm & maps
PostPosted: Sun Sep 04, 2005 8:56 pm 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
Hibernate version: week old checkout

Mapping documents:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="cours4.model">
<class name="Team" table="TEAM" lazy="true">
<id name="id" column="TEAM_ID" type="integer">
<generator class="native"/>
</id>
<property name="name" column="TEAM_NAME" type="string"/>
<property name="nbWon" column="NB_WON" type="integer"/>
<property name="nbLost" column="NB_LOST" type="integer"/>
<property name="nbPlayed" column="NB_PLAYED" type="integer"/>
<many-to-one name="coach" class="Coach" column="COACH_ID"
unique="true" cascade = "save-update"/>
<set name="players" cascade="save-update" inverse="true">
<key column="TEAM_ID" />
<one-to-many class="Player" />
</set>
<map name="homeGames" cascade="save-update" inverse="true" lazy="true">
<key column="HOME_TEAM_ID" />
<index column="GAME_DATE" type="date" />
<one-to-many class="Game" />
</map>
<map name="awayGames" cascade="save-update" inverse="true" lazy="true">
<key column="AWAY_TEAM_ID" />
<index column="GAME_DATE" type="date" />
<one-to-many class="Game" />
</map>
</class>
</hibernate-mapping>

Full stack trace of any exception that occurs:

[hibernatetool] SEVERE: ResourceManager : unable to find resource 'hbm/map.hbm.vm' in any resource loader.

BUILD FAILED
D:\workspace-hibtools2\hbm2jsf\build.xml:13: org.hibernate.tool.hbm2x.ExporterException: Error while processing template hbm/map.hbm.vm

If the map elements are commented out from the mapping document, all is well.

Keep in mind, this happens when I am telling hibernatetool to
1.) build the configuration from mapping documents
2.) regenerate the same mapping documents from the configuration

<hibernatetool destdir=".">
<configuration>
<fileset dir="anthony" >
<include name="**/**.hbm.xml"/>
</fileset>
</configuration>
<cfg2hbm/>
</hibernatetool>

No Max, I don't have a real need for this.

Nevertheless, if a + b = c, then c - b = a


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 2:49 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
yes - cfg2hbm currently only handles what rev.eng generates + whatever David and I have had time to add.

We want it to be more complete, but there is still some way to go...feel free to add it ,)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 05, 2005 8:14 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I have been caught up with work and life in general so I have been unable to add many features I would have liked to have completed by now. It will improve, just having trouble getting the time for hibernate 'fun'. Thinks look like they might change as we head toward christmas.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 1:09 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
no problem david - we all need to get food on the table and presents for christmas.

I appreciate any help you have done - past and future ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 3:29 am 
Expert
Expert

Joined: Mon Jul 04, 2005 5:19 pm
Posts: 720
david wrote:
I have been caught up with work and life in general


Cheer up dude. I'll even give the points for this one ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 11:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
max wrote:
no problem david - we all need to get food on the table and presents for christmas.


Most definitely.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 06, 2005 7:29 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Thanks Guys - you made my day.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.