Hello,
I'm using MS-Sql 7.0 with jTDS 0.6 rc1.
Ok, I know that this is a not supported configuration but I get this error when update to 2.1.2 version, with hibernate 2.1.1 every works fine.
When I try to insert a new currency I get the following exception:
Code:
java.sql.SQLException: 'SCOPE_IDENTITY' is not a recognized function name.
at net.sourceforge.jtds.jdbc.SqlMessage.toSQLException(SqlMessage.java:85)
at net.sourceforge.jtds.jdbc.SQLWarningChain.addOrReturn(SQLWarningChain.java:99)
at net.sourceforge.jtds.jdbc.Tds.submitProcedure(Tds.java:609)
at net.sourceforge.jtds.jdbc.PreparedStatement_base.submitProcedure(PreparedStatement_base.java:195)
at net.sourceforge.jtds.jdbc.PreparedStatement_base.execute(PreparedStatement_base.java:174)
at net.sourceforge.jtds.jdbc.PreparedStatement_base.executeQuery(PreparedStatement_base.java:210)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:508)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)
The currency mapping is:
Code:
<hibernate-mapping>
<class
name="com.giux.model.Currency"
table="app_currencies"
dynamic-update="false"
dynamic-insert="false">
<id
name="id"
column="id"
type="java.lang.Long"
unsaved-value="null">
<generator class="native"></generator>
</id>
<property
name="name"
type="string"
update="true"
insert="true"
column="name"
not-null="true"
unique="true"/>
<property
name="description"
type="string"
update="true"
insert="true"
column="description"
not-null="true"
unique="false"/>
</class>
</hibernate-mapping>
Thanks, Claudio