-
1. Re: Getting Exception - Cannot insert explicit value for ide
ruchi123456 Jun 17, 2007 5:34 AM (in response to ruchi123456)Also with somebody'd suggestion i changed my code to the following
----------------------
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Integer cNo;
----------------------
But now am getting errException
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]'last_insert_id' is not a recognized function name.
Any suggestions? -
2. Re: Getting Exception - Cannot insert explicit value for ide
ruchi123456 Jun 17, 2007 6:59 AM (in response to ruchi123456)Also i am connecting to SQL sever 2000
My persistence.xml is
<?xml version="1.0" encoding="UTF-8"?>
<persistence-unit name="shoestringPU">
<jta-data-source>java:/SCMSSQLDSS</jta-data-source>
com.j3ltd.server.entities.Person
com.j3ltd.server.entities.Address
</persistence-unit>
I am using SQL Server2000, but am using "org.hibernate.dialect.MySQLDialect" in persistence.xml
I am not sure if that is an issue? -
3. Re: Getting Exception - Cannot insert explicit value for ide
ruchi123456 Jun 17, 2007 8:12 AM (in response to ruchi123456)I used
And my problem is resolved :)
Thanks All :)
Regards,
Ruchika