Skip to content

Commit 68f37fa

Browse files
committed
SequenceStructure.cs: Handle getting the sequence value also for databases where the returned value isn't an int64.
1 parent 17d111e commit 68f37fa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NHibernate/Id/Enhanced/SequenceStructure.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Data;
23
using System.Data.Common;
34

@@ -98,7 +99,7 @@ public virtual long GetNextValue()
9899
try
99100
{
100101
rs.Read();
101-
long result = rs.GetInt64(0);
102+
long result = Convert.ToInt64(rs.GetValue(0));
102103
if (Log.IsDebugEnabled)
103104
{
104105
Log.Debug("Sequence value obtained: " + result);

0 commit comments

Comments
 (0)