views:

236

answers:

2

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 contain 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 ?

A: 

well apparently not with the version of jboss/hibernate im using

hatchetman82
+1  A: 

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

Pascal Thivent
no, i didnt set metadata-complete.unfortunately i no longer have the toy project i set up to verify this, as i've switched completely over to orm.xml
hatchetman82