sergey wrote:
Try enabling SQL logging and check the statements that NH attempts to execute.
It's full stack trace;
Code:
2006-01-20 20:36:42,978 [2792] INFO NHibernate.Cfg.Environment [(null)] <(null)> - NHibernate 1.0.1.0
2006-01-20 20:36:43,008 [2792] INFO NHibernate.Cfg.Environment [(null)] <(null)> - Using reflection optimizer
2006-01-20 20:36:43,008 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Searching for mapped documents in assembly: BugProject
2006-01-20 20:36:43,018 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Found mapping documents in assembly: BugProject.MappingFiles.RailPoint.hbm.xml
2006-01-20 20:36:43,069 [2792] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-01-20 20:36:43,109 [2792] INFO NHibernate.Cfg.Binder [(null)] <(null)> - Mapping class: BugProject.ModelClasses.RailPoint -> T_Logical_Rail_Point
2006-01-20 20:36:43,139 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Id -> Point_ID, type: Int32
2006-01-20 20:36:43,169 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: X -> X_Coord, type: Int32
2006-01-20 20:36:43,169 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Y -> Y_Coord, type: Int32
2006-01-20 20:36:43,189 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.Point
2006-01-20 20:36:43,189 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:43,189 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:43,199 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-01-20 20:36:43,399 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_Point : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_Point(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
t.X = values[0] == null ? new System.Int32() : (System.Int32)values[0];
t.Y = values[1] == null ? new System.Int32() : (System.Int32)values[1];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
object[] ret = new object[2];
ret[0] = t.X;
ret[1] = t.Y;
return ret;
}
}
}
2006-01-20 20:36:43,399 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Point -> X_Coord, Y_Coord, type: Point
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Line -> Path_ID, type: Line
2006-01-20 20:36:43,409 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Found mapping documents in assembly: BugProject.MappingFiles.Line.hbm.xml
2006-01-20 20:36:43,409 [2792] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-01-20 20:36:43,409 [2792] INFO NHibernate.Cfg.Binder [(null)] <(null)> - Mapping class: BugProject.ModelClasses.Line -> T_Logical_Rail
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Id -> Path_ID, type: Int32
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: X -> X0_Coord, type: Int32
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Y -> Y0_Coord, type: Int32
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.Point
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:43,409 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_Point : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_Point(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
t.X = values[0] == null ? new System.Int32() : (System.Int32)values[0];
t.Y = values[1] == null ? new System.Int32() : (System.Int32)values[1];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
object[] ret = new object[2];
ret[0] = t.X;
ret[1] = t.Y;
return ret;
}
}
}
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: StartPoint -> X0_Coord, Y0_Coord, type: Point
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: X -> X1_Coord, type: Int32
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Y -> Y1_Coord, type: Int32
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.Point
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:43,569 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-01-20 20:36:43,729 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_Point : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_Point(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
t.X = values[0] == null ? new System.Int32() : (System.Int32)values[0];
t.Y = values[1] == null ? new System.Int32() : (System.Int32)values[1];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.Point t = (BugProject.ModelClasses.Point)obj;
object[] ret = new object[2];
ret[0] = t.X;
ret[1] = t.Y;
return ret;
}
}
}
2006-01-20 20:36:43,739 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: EndPoint -> X1_Coord, Y1_Coord, type: Point
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Points, type: ISet
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Model -> Model_Id, type: Model
2006-01-20 20:36:43,760 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - Found mapping documents in assembly: BugProject.MappingFiles.Model.hbm.xml
2006-01-20 20:36:43,760 [2792] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-01-20 20:36:43,760 [2792] INFO NHibernate.Cfg.Binder [(null)] <(null)> - Mapping class: BugProject.ModelClasses.Model -> T_Model_Master
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Id -> Model_ID, type: Int32
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Name -> Model_Name, type: String
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Info -> Model_Info, type: String
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Type -> Model_Type, type: Int32
2006-01-20 20:36:43,760 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped property: Lines, type: ISet
2006-01-20 20:36:43,770 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-many association mappings
2006-01-20 20:36:43,770 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Second pass for collection: BugProject.ModelClasses.Line.Points
2006-01-20 20:36:43,780 [2792] INFO NHibernate.Cfg.Binder [(null)] <(null)> - mapping collection: BugProject.ModelClasses.Line.Points -> T_Logical_Rail_Point
2006-01-20 20:36:43,780 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped collection key: Path_ID, one-to-many: RailPoint
2006-01-20 20:36:43,780 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Second pass for collection: BugProject.ModelClasses.Model.Lines
2006-01-20 20:36:43,780 [2792] INFO NHibernate.Cfg.Binder [(null)] <(null)> - mapping collection: BugProject.ModelClasses.Model.Lines -> T_Logical_Rail
2006-01-20 20:36:43,780 [2792] DEBUG NHibernate.Cfg.Binder [(null)] <(null)> - Mapped collection key: Model_Id, one-to-many: Line
2006-01-20 20:36:43,780 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing one-to-one association property references
2006-01-20 20:36:43,780 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - processing foreign key constraints
2006-01-20 20:36:43,780 [2792] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - resolving reference to class: Model
2006-01-20 20:36:43,780 [2792] DEBUG NHibernate.Cfg.Configuration [(null)] <(null)> - resolving reference to class: Line
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Dialect.Dialect [(null)] <(null)> - Using dialect: NHibernate.Dialect.MsSql2000Dialect
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - use outer join fetching: True
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Connection.ConnectionProviderFactory [(null)] <(null)> - Intitializing connection provider: NHibernate.Connection.DriverConnectionProvider
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Connection.ConnectionProvider [(null)] <(null)> - Configuring ConnectionProvider
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Optimize cache for minimal puts: False
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - Query language substitutions: {}
2006-01-20 20:36:43,800 [2792] INFO NHibernate.Cfg.SettingsFactory [(null)] <(null)> - cache provider: NHibernate.Cache.HashtableCacheProvider
2006-01-20 20:36:43,810 [2792] INFO NHibernate.Cfg.Configuration [(null)] <(null)> - instantiating and configuring caches
2006-01-20 20:36:43,820 [2792] INFO NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - building session factory
2006-01-20 20:36:43,820 [2792] DEBUG NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - instantiating session factory with properties: {hibernate.connection.driver_class=NHibernate.Driver.SqlClientDriver, hibernate.dialect=NHibernate.Dialect.MsSql2000Dialect, hibernate.connection.provider=NHibernate.Connection.DriverConnectionProvider, hibernate.use_reflection_optimizer=True, hibernate.connection.connection_string=Trusted_Connection=yes; Data Source=localhost; Trusted_Connection=yes; database=BugProject}
2006-01-20 20:36:43,870 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.Line
2006-01-20 20:36:43,870 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:43,870 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:43,870 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\Iesi.Collections.dll
2006-01-20 20:36:44,030 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_Line : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_Line(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.Line t = (BugProject.ModelClasses.Line)obj;
t.StartPoint = (BugProject.ModelClasses.Point)values[0];
t.Points = (Iesi.Collections.ISet)values[1];
t.EndPoint = (BugProject.ModelClasses.Point)values[2];
t.Model = (BugProject.ModelClasses.Model)values[3];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.Line t = (BugProject.ModelClasses.Line)obj;
object[] ret = new object[4];
ret[0] = t.StartPoint;
ret[1] = t.Points;
ret[2] = t.EndPoint;
ret[3] = t.Model;
return ret;
}
}
}
2006-01-20 20:36:44,040 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.Model
2006-01-20 20:36:44,040 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:44,040 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:44,040 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
2006-01-20 20:36:44,040 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\Iesi.Collections.dll
2006-01-20 20:36:44,190 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_Model : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_Model(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.Model t = (BugProject.ModelClasses.Model)obj;
t.Name = (System.String)values[0];
t.Lines = (Iesi.Collections.ISet)values[1];
t.Type = values[2] == null ? new System.Int32() : (System.Int32)values[2];
t.Info = (System.String)values[3];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.Model t = (BugProject.ModelClasses.Model)obj;
object[] ret = new object[4];
ret[0] = t.Name;
ret[1] = t.Lines;
ret[2] = t.Type;
ret[3] = t.Info;
return ret;
}
}
}
2006-01-20 20:36:44,190 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Init compiler for class BugProject.ModelClasses.RailPoint
2006-01-20 20:36:44,190 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\NHibernate.dll
2006-01-20 20:36:44,190 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Adding referenced assembly D:\_Works\_NET\CSharp\BugProject\bin\Debug\BugProject.exe
2006-01-20 20:36:44,350 [2792] DEBUG NHibernate.Persister.GetSetHelperFactory [(null)] <(null)> - Compiled ok:
using System;
using NHibernate.Property;
namespace NHibernate.Persister {
public class GetSetHelper_BugProject_ModelClasses_RailPoint : IGetSetHelper {
ISetter[] setters;
IGetter[] getters;
public GetSetHelper_BugProject_ModelClasses_RailPoint(ISetter[] setters, IGetter[] getters) {
this.setters = setters;
this.getters = getters;
}
public void SetPropertyValues(object obj, object[] values) {
BugProject.ModelClasses.RailPoint t = (BugProject.ModelClasses.RailPoint)obj;
t.Line = (BugProject.ModelClasses.Line)values[0];
t.Point = (BugProject.ModelClasses.Point)values[1];
}
public object[] GetPropertyValues(object obj) {
BugProject.ModelClasses.RailPoint t = (BugProject.ModelClasses.RailPoint)obj;
object[] ret = new object[2];
ret[0] = t.Line;
ret[1] = t.Point;
return ret;
}
}
}
2006-01-20 20:36:44,491 [2792] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - initializing class SessionFactoryObjectFactory
2006-01-20 20:36:44,491 [2792] DEBUG NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - registered: a25442e14c1847769d5c21279350f740(unnamed)
2006-01-20 20:36:44,491 [2792] INFO NHibernate.Impl.SessionFactoryObjectFactory [(null)] <(null)> - no name configured
2006-01-20 20:36:44,491 [2792] DEBUG NHibernate.Impl.SessionFactoryImpl [(null)] <(null)> - Instantiated session factory
2006-01-20 20:36:44,511 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - opened session
2006-01-20 20:36:45,532 [2792] DEBUG NHibernate.Transaction.AdoTransaction [(null)] <(null)> - begin
2006-01-20 20:36:45,532 [2792] DEBUG NHibernate.Connection.DriverConnectionProvider [(null)] <(null)> - Obtaining IDbConnection from Driver
2006-01-20 20:36:45,712 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - saving [BugProject.ModelClasses.Model#<null>]
2006-01-20 20:36:45,722 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - executing insertions
2006-01-20 20:36:45,732 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - processing cascades for: BugProject.ModelClasses.Model
2006-01-20 20:36:45,742 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - done processing cascades for: BugProject.ModelClasses.Model
2006-01-20 20:36:45,782 [2792] DEBUG NHibernate.Impl.WrapVisitor [(null)] <(null)> - Wrapped collection in role: BugProject.ModelClasses.Model.Lines
2006-01-20 20:36:45,792 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Inserting entity: BugProject.ModelClasses.Model (native id)
2006-01-20 20:36:45,802 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands :1
2006-01-20 20:36:45,802 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO T_Model_Master (Model_Name, Model_Type, Model_Info) VALUES (:Model_Name, :Model_Type, :Model_Info); select SCOPE_IDENTITY()
2006-01-20 20:36:45,802 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Dehydrating entity: [BugProject.ModelClasses.Model#<null>]
2006-01-20 20:36:45,802 [2792] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'Bug model' to parameter: 0
2006-01-20 20:36:45,802 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '1' to parameter: 1
2006-01-20 20:36:45,812 [2792] DEBUG NHibernate.Type.StringType [(null)] <(null)> - binding 'Bug model' to parameter: 2
2006-01-20 20:36:45,812 [2792] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO T_Model_Master (Model_Name, Model_Type, Model_Info) VALUES (@p0, @p1, @p2); select SCOPE_IDENTITY()
2006-01-20 20:36:45,812 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened Reader, open Readers :1
2006-01-20 20:36:45,812 [2792] DEBUG NHibernate.Persister.AbstractEntityPersister [(null)] <(null)> - Natively generated identity: 3
2006-01-20 20:36:45,822 [2792] DEBUG NHibernate.Driver.NHybridDataReader [(null)] <(null)> - running NHybridDataReader.Dispose()
2006-01-20 20:36:45,822 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed Reader, open Readers :0
2006-01-20 20:36:45,822 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands :0
2006-01-20 20:36:45,822 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - processing cascades for: BugProject.ModelClasses.Model
2006-01-20 20:36:45,822 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - cascading to collection: BugProject.ModelClasses.Model.Lines
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - cascading to SaveOrUpdate()
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - unsaved-value: 0
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - SaveOrUpdate() unsaved instance
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - saving [BugProject.ModelClasses.Line#<null>]
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - executing insertions
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - processing cascades for: BugProject.ModelClasses.Line
2006-01-20 20:36:45,832 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - done processing cascades for: BugProject.ModelClasses.Line
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Impl.WrapVisitor [(null)] <(null)> - Wrapped collection in role: BugProject.ModelClasses.Line.Points
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Inserting entity: BugProject.ModelClasses.Line (native id)
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands :1
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO T_Logical_Rail (X0_Coord, Y0_Coord, X1_Coord, Y1_Coord, Model_Id) VALUES (:X0_Coord, :Y0_Coord, :X1_Coord, :Y1_Coord, :Model_Id); select SCOPE_IDENTITY()
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Dehydrating entity: [BugProject.ModelClasses.Line#<null>]
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '1' to parameter: 0
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '10' to parameter: 1
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '1' to parameter: 2
2006-01-20 20:36:45,843 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '20' to parameter: 3
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '3' to parameter: 4
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO T_Logical_Rail (X0_Coord, Y0_Coord, X1_Coord, Y1_Coord, Model_Id) VALUES (@p0, @p1, @p2, @p3, @p4); select SCOPE_IDENTITY()
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened Reader, open Readers :1
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Persister.AbstractEntityPersister [(null)] <(null)> - Natively generated identity: 3
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Driver.NHybridDataReader [(null)] <(null)> - running NHybridDataReader.Dispose()
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed Reader, open Readers :0
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands :0
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - processing cascades for: BugProject.ModelClasses.Line
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - cascading to collection: BugProject.ModelClasses.Line.Points
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - cascading to SaveOrUpdate()
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Engine.Cascades [(null)] <(null)> - unsaved-value: 0
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - SaveOrUpdate() unsaved instance
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - saving [BugProject.ModelClasses.RailPoint#<null>]
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.SessionImpl [(null)] <(null)> - executing insertions
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Inserting entity: BugProject.ModelClasses.RailPoint (native id)
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Opened new IDbCommand, open IDbCommands :1
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Building an IDbCommand object for the SqlString: INSERT INTO T_Logical_Rail_Point (Path_ID, X_Coord, Y_Coord) VALUES (:Path_ID, :X_Coord, :Y_Coord); select SCOPE_IDENTITY()
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Persister.EntityPersister [(null)] <(null)> - Dehydrating entity: [BugProject.ModelClasses.RailPoint#<null>]
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '3' to parameter: 0
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '1' to parameter: 1
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.Type.Int32Type [(null)] <(null)> - binding '10' to parameter: 2
2006-01-20 20:36:45,853 [2792] DEBUG NHibernate.SQL [(null)] <(null)> - INSERT INTO T_Logical_Rail_Point (Path_ID, X_Coord, Y_Coord) VALUES (@p0, @p1, @p2); select SCOPE_IDENTITY()
2006-01-20 20:36:45,883 [2792] DEBUG NHibernate.Impl.BatcherImpl [(null)] <(null)> - Closed IDbCommand, open IDbCommands :0
2006-01-20 20:36:45,883 [2792] DEBUG NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - could not insert: [BugProject.ModelClasses.RailPoint]
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Model_ID', table 'BugProject.dbo.T_Logical_Rail_Point'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
at NHibernate.Persister.EntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session)
2006-01-20 20:36:45,893 [2792] WARN NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Model_ID', table 'BugProject.dbo.T_Logical_Rail_Point'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
at NHibernate.Persister.EntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session)
2006-01-20 20:36:45,893 [2792] ERROR NHibernate.Util.ADOExceptionReporter [(null)] <(null)> - Cannot insert the value NULL into column 'Model_ID', table 'BugProject.dbo.T_Logical_Rail_Point'; column does not allow nulls. INSERT fails.
The statement has been terminated.
2006-01-20 20:36:45,893 [2792] ERROR NHibernate.ADOException [(null)] <(null)> - could not insert: [BugProject.ModelClasses.RailPoint]
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Model_ID', table 'BugProject.dbo.T_Logical_Rail_Point'; column does not allow nulls. INSERT fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd)
at NHibernate.Persister.EntityPersister.Insert(Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session)
NH try to execute this statement
INSERT INTO T_Logical_Rail_Point (Path_ID, X_Coord, Y_Coord) VALUES (@p0, @p1, @p2); select SCOPE_IDENTITY()
Maybe I need to config for RailPoint class has some relation with Model class. But it's the first time I try to use NHibernate. :-(