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