OK well I did the following to solve it ... instead of
Code:
<property name="connection.datasource">java:comp/env/jdbc/schedules</property>
i used
Code:
<property name="hibernate.connection.username">sa</property>
<property name="hibernate.connection.password">blah</property>
<property name="hibernate.connection.url">jdbc:jtds:sqlserver://intratestgbr:1433/dbSchedules;charset=Cp1252;TDS=7.0</property>
<property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
And the output of Hibernate's calls are now without Schema (but I do session.connection().setCatalog("dbSchedules") in my code.
Hibernate: insert into Schedules (status, title, summary, description, created, last_updated) values (?, ?, ?, ?, ?, ?)
Hibernate: insert into DataAcquisitionSchedules (productName, productRelease, schedule_id) values (?, ?, ?)
I cannot understand why specifying the JNDI datasource causes Hibernate to add the schema onto the sql statements yet using Hibernate's internal connection settings removes it. The settings are identical in their values. Is this intended behaviour?
Cheers, ADC