I am using Nhibernate for oracle, and I need to increment my primary key value for each insert. Which one is the best way and efficient way? Oracle sequence, Nhinerbate increment or another way?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With oracle, you could use
seqhilo, which uses a database sequence instead of a separate table. You get the advantage of hilo (key generation in memory, no db roundtrip needed) and sequences (no separate transaction needed) at the same time.