Update of /cvsroot/nhibernate/nhibernate/src/NHibernate/Id
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18516/NHibernate/Id
Modified Files:
IncrementGenerator.cs
Log Message:
Made another fix in incrementgenerator. Made a few fixes in hbm2net. Added new abcproxytest, and ignored it because of proxy problems.
Index: IncrementGenerator.cs
===================================================================
RCS file: /cvsroot/nhibernate/nhibernate/src/NHibernate/Id/IncrementGenerator.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** IncrementGenerator.cs 6 Apr 2004 10:18:50 -0000 1.3
--- IncrementGenerator.cs 6 Apr 2004 10:51:40 -0000 1.4
***************
*** 61,66 ****
--- 61,70 ----
{
string table = PropertiesHelper.GetString("table", parms, (string)parms[IncrementGenerator.Table]);
+ if(table == null || table == string.Empty)
+ throw new MappingException("param named \"table\" is required for incrementgeneration strategy");
string column = PropertiesHelper.GetString("column", parms, (string)parms[IncrementGenerator.PK]);
+ if(column == null || column == string.Empty)
+ throw new MappingException("param named \"column\" is required for incrementgeneration strategy");
string schema = (string) parms[Schema];
***************
*** 89,97 ****
if(rs.Read())
{
! next = rs.GetInt64(0) + 1;
! }
! else
! {
! next = 1;
}
sql = null;
--- 93,100 ----
if(rs.Read())
{
! if (rs.IsDBNull(0))
! next = 1;
! else
! next = rs.GetInt64(0) + 1;
}
sql = null;
|