Hibernate version:3
I have a JDBC driver for accessing Comma Separated Values text files that accepts properties in a .java class as follows:
Code:
Properties props = new java.util.Properties();
props.put("separator","|"); // separator is a bar
props.put("suppressHeaders","true"); // first line contains data
props.put("fileExtension",".txt"); // file extension is .txt
props.put("charset","ISO-8859-2"); // file encoding is "ISO-8859-2"
Connection conn = Drivermanager.getConnection("jdbc:relique:csv:" + args[0],props)
My question for my Hibernate.cfg.xml I have...
Code:
...
<session-factory>
<property name="hibernate.connection.driver_class">org.relique.jdbc.csv.CsvDriver</property>
<property name="hibernate.connection.url">jdbc:relique:csv:/AJCS/files/VerdX/Data/DataSources/</property>
<property name="hibernate.connection.username">sa</property>
...
if I read the documentation properly I think I would pass the driver specific properties to the CsvDriver as follows:
Code:
<property name="hibernate.connection.separator">|</property>
<property name="hibernate.connection.fileExtension">.txt</property>
<property name="hibernate.connection.suppressHeaders">true</property>
<property name="hibernate.connection.charset">ISO-8859-2</property>
If this is true, and this doesn't work, then the problem I have of the driver not getting these properties, specifically the default file extenstion remains .csv (default) and does not pick up the .txt property, must therefore be in the driver and not Hibernate, yes?
;-)