-->
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.  [ 2 posts ] 
Author Message
 Post subject: hbm2hbmxml doesn't export components
PostPosted: Sat Apr 05, 2008 4:07 pm 
Newbie

Joined: Mon Mar 17, 2008 3:07 pm
Posts: 8
I observed there is a feature in Hibernate tools not implemented yet, as
shown in the following piece of code, extracted from the class
org.hibernate.tool.hbm2x.HibernateMappingExporter:

protected void exportComponent(Map additionalContext, POJOClass element) {
// we don't want component's exported.
}

The resulting effect is the following: an exported hbm file containing a
TODO message in it, as defined in "hbm/component.hbm.ftl" template.

I would like to know the reason for that because I need this feature and I
am able to produce an issue, and even a patch with unit test case plus
implementation.

If you are curious about why I need this feature, here is my strategy to
use new technology (hibernate3/java1.5) when designing and generate the
needed artifacts to an external implementation team will use older
technology (hibernate2/java1.4):
1) I produce Java domain classes with javax.persistence annotations.
2) I import these classes to an instance of AnnotationConfiguration (cfg).
3) I inject specific database objects (id-sequences and fk-indexes) in
that cfg.
4) I export the cfg's mappings to ddl script and hbm files.
5) I transform exported hbm file to a format compatible with hibernate2.
6) I transform Java source code to Java 1.4, commenting out all annotations.

So, to complete step 4, I need the missing feature.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 4:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
1) The line is commented out since components does not need a seperate export when we are doing hbm.xml (pojo requires separate files)

2) If you have a patch with unit test and implementation why don't you just submit it to jira ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.