I'm beginning using version 0.9 and feel that some more detail on the error messages could be very useful. Of course that is a general rule, but specifically in the case of property to SQL and SQL to property conversions it would really be great to have messages such as "Couldn't assign <type> value <val> to property <prop> of class <SomeNameSpace.SomeClass>. Type <type> or convertible was expected."
What I'm getting below doesn't really help. Sure, I can debug the source code, but it's so much more time-consuming...
Out: NHibernate.SessionImpl.Execute: could not synchronize database state with session
NHibernate.DateTimeType.Set: Specified cast is not valid.
Stack Trace:
NHibernate.ADOException: could not synchronize database state with session ---> System.InvalidCastException: Specified cast is not valid.
at NHibernate.Type.DateTimeType.Set(IDbCommand st, Object value, Int32 index)
at NHibernate.Type.NullableType.NullSafeSet(IDbCommand cmd, Object value, Int32 index)
at NHibernate.Type.NullableType.NullSafeSet(IDbCommand st, Object value, Int32 index, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Dehydrate(Object id, Object[] fields, Boolean[] includeProperty, IDbCommand st, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, SqlString sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.EntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Impl.ScheduledInsertion.Execute()
at NHibernate.Impl.SessionImpl.ExecuteAll(IList list)
at NHibernate.Impl.SessionImpl.Execute()
--- End of inner exception stack trace ---
at NHibernate.Impl.SessionImpl.Execute()
at NHibernate.Impl.SessionImpl.Flush()
at NegocioNUnitTests.PessoaColectiva_BT.CT1() in C:\Projectos\P2051B\REI\Sources\NegocioNUnitTests\PessoaColectiva_BT.vb:line 50
P.S.: Oh, I did consider posting on the Suggestions Thread. But it felt so lonely there...
|