|
Support For Other DatabasesSince XPlanner uses the Hibernate object-relational mapping layer, XPlanner should work with any database which Hibernate supports. Hibernate currently supports quite a few databases, and the list of supported databases is rapidly growing. Note: Although Hibernate "supports" many databases, it doesn't mean the Hibernate-generated schema and queries will be compatible with all those databases. Clashes with Proprietary Reserved KeywordsMany databases have nonstandard proprietary keywords that cannot be used in their database schema. Fortunately, this problem can be addressed in the Hibernate mapping layer by modifying the column name mapping. For example: Test 1 2 3 <?xml version="1.0" encoding="UTF-8"?>The highlighted property causes clashes with databases like Oracle that reserve the "file" as a keyword (by default, Hibernate will name the table column the same as the property name). There are at least two potential solutions. You can edit the mapping file like... <property name="body" length="4000"/>
<property name="file" column="xfile" type="binary"/>
<property name="filename"/>
The downside of this approach is that handedited mapping files may not remain consistent with mappings in future versions of XPlanner. Starting with XPlanner 0.5.3 you can also use XSLT transforms to automatically rewrite the mapping files. Two mappings are included in the XPlanner distribution: Oracle and PostgreSQL. The Oracle mapping transformation is... <?xml version="1.0"?> This transformation will automatically add a "column='xfile'" attribute to the file propery if the Note mapping. To configure XPlanner to use the mapping transformation add the following property to your database-related properties: xplanner.hibernate.mappingtransform=oracle-mapping-transform.xsl Of course, substitute the mapping transform file for your desired database. Problems with Hibernate Mapped Data TypesThere are small problems with the Hibernate "dialects" defined for some databases. Currently, there are customized dialects included with XPlanner.
|