Hi i am getting this error while i am trying to use my oracle db sequence in hibernates. i am using this declaration :
@Entity
@Table(name = "T_USER_DETAILS")
public class User {
@GenericGenerator(name = "generator",strategy = "sequence-identity",parameters = { @Parameter(name = "sequence",value = "USER_ID_SEQ")} )
@Id
@GeneratedValue(generator = "generator")
@Column(name = "USER_ID")
private int userid;
..
and using this to persist my entity instance:
session = sessionFactory.openSession();
//creating the new transaction from the above created session that is starting a new unit of work
transaction = session.beginTransaction();
session.save(user);
transaction.commit();
System.out.println("User saved successfully in the database");
}
catch(Exception ex)
{
but i am getting the error:
Apr 11, 2013 11:10:20 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: ORA-00917: missing comma
caught : ORA-00917: missing comma
Could anyone assist on this?