Is it possible to mix orm.xml definitions with annotations when using JPA/hibernate?
I'm working on an application whihc supports using several DB vendors, with the table definitions being different for each DB type. The trouble is that the column definitions are not what hibernate expects, and so my entities conta开发者_开发问答in a lot of @Column(..columnDefintion="..."...) annotations.
To further complicate the issue, there's no way to specify a columnDefinition per DB. So I tried moving just the columnDefinition bits to an orm.xml file, and I have a Maven profile that bundles the correct file.
JBoss 4.0.5/Hibernate 3.2.0GA fails to validate, and it seems it completely disregards the annotations given an xml file.
Is there a way to make Hibernate "merge" the data from the xml with the annotations ?
JBoss 4.0.5/Hibernate 3.2.0GA fails to validate, and it seems it completely disregards the annotations given an xml file.
Well, maybe you told him to do so (by specifying a metadata-complete
attribute). Maybe you should have shown your orm.xml
(or one of them).
well apparently not with the version of jboss/hibernate im using
精彩评论