TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sreenivasa k
890
893
34.2k
Sequence generator in Nhibernate (c#)
Jan 16 2018 11:57 AM
Hi All,
I have a conversion project (from oracle to sql server) and using NHibernate to handle database operations.
1. Saving is working when we Save entity by using oracle . here for a column has sequence
2. But same if we do in SQL server it is not working as getting 'null Identifier'
Query:
Insert into Dept(deptname, loc) values (@po,@p1) scope_identity, @p0='IT' , @p1='Hyd'
Exception: null Identifier.
dept.hbm.xml
<id name="id" column="deptid">
<generator class="identity">
<param name="sequence">SEQ_DEPT_ID</param>
</generator>
</id>
Note: we are using Instead of Insert triggers in SQL server.
Please help . thanks in advance.
Reply
Answers (
1
)
How to move cursor from one row to other?
Read text from PDF including tables