Hi Truong, Did you manage to find a solution for this. Do let me know.
Regards, Gautham On Wednesday, November 20, 2013 6:10:05 AM UTC-5, Truong Nguyen wrote: > > I have an issue with AUTO INCREMENT field in Oracle 12c. It can not insert > data into tables which have IDENTITY define. It throws exception when > Hibernate persist. If anyone have experience on it. Please share! > > *Note:* I also try with other solution like create SEQUENCE and TRIGGER > as link below. However, it throws the same errors. :( > > http://stackoverflow.com/questions/2384420/how-is-my-id-being-generated-with-jpa-using-hibernate-with-the-oracle-10g-dialec > > Exception: java.lang.IllegalArgumentException: > org.hibernate.dialect.*Oracle10gDialect > *does not support identity key generation > > + persistence.xml > <property name="hibernate.dialect" > value="org.hibernate.dialect.Oracle10gDialect" /> > > + Oracle Table > CREATE TABLE "USER" > ( "USER_ID" NUMBER(10,0) *GENERATED BY DEFAULT ON NULL > AS IDENTITY,* > "APP_USER_ID" NUMBER(10,0), > .............. > ) > > + Hibernate > @Entity > @Table(name="USER") > public class User implements Serializable { > private static final long serialVersionUID = 1L; > > @Id > @GeneratedValue(strategy = GenerationType.IDENTITY) > @Column(name="USER_ID") > private Integer UsrId; > > + Java code > entityManager.persist(user); -----> Exception: > java.lang.IllegalArgumentException: org.hibernate.dialect.*Oracle10gDialect > *does not support identity key generation > > Thank you very much. > > On Saturday, 24 August 2013 16:43:19 UTC+7, Alexander I. Zaytsev wrote: >> >> Does anyone have Oracle 12c installed and able to run tests against it? >> >> >> 2013/7/15 Alexander I. Zaytsev <[email protected]> >> >>> Hi guys, >>> >>> I'm planning to add dialect for Oracle 12c. >>> >>> The new features affecting the dialect would be: >>> >>> - support identity columns >>> - support new paging syntax with OFFSET / FETCH keywords. >>> >>> The problem with new limit syntax that it does not support "FOR UPDATE" >>> with it. So what do you prefer of following? >>> >>> - fallback to previous version of paging using rownum. >>> - throw exception that "for update" and paging can not work together >>> - ignore "for update" clasue in case of paging >>> >>> Best Regards, >>> Alex >>> >> >> -- --- You received this message because you are subscribed to the Google Groups "nhibernate-development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
