i've a table with a single field primary key, the type of this field is timestamp; the problem is that when i save a new entity i'm getting a "Could not save object" error "Value cannot be null\r\n Parameter name : id"
when i quit the application instead the record was regularly saved with right timestamp key.
i tried changing generator class to native but nothing
any idea ?
thanks
Hibernate version: 1.2.0 Beta1
Mapping documents:
<id name ='ID' column ='IMPID'>
<generator class ='identity' />
</id>
<property name='UserID' column='IMPUSER' />
<property name='AppointmentDatetime' column='IMPDATE' />
.......
Full stack trace of any exception that occurs:
in NHibernate.Impl.SessionImpl.SaveWithGeneratedIdentifier(Object obj, CascadingAction action, Object anything) in C:\Documents and Settings\luke\Desktop\NHibernate Beta 1\NHibernate\Impl\SessionImpl.cs:riga 813
in NHibernate.Impl.SessionImpl.Save(Object obj) in C:\Documents and Settings\luke\Desktop\NHibernate Beta 1\NHibernate\Impl\SessionImpl.cs:riga 750
in NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj) in C:\Documents and Settings\luke\Desktop\NHibernate Beta 1\NHibernate\Impl\SessionImpl.cs:riga 1581
in RuredilManager.frmImpegno.kbConfirm_Click(Object sender, EventArgs e) in C:\Documents and Settings\luke\Desktop\RuredilManager\RuredilManager\frmImpegno.cs:riga 91
in System.Windows.Forms.Control.OnClick(EventArgs e)
in ComponentFactory.Krypton.Toolkit.KryptonButton.OnClick(EventArgs e)
in ComponentFactory.Krypton.Toolkit.KryptonButton.OnButtonClick(Object sender, MouseEventArgs e)
in ComponentFactory.Krypton.Toolkit.ButtonController.OnClick(MouseEventArgs e)
in ComponentFactory.Krypton.Toolkit.ButtonController.MouseUp(Control c, Point pt, MouseButtons button)
in ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
in ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
in ComponentFactory.Krypton.Toolkit.ViewBase.MouseUp(Point pt, MouseButtons button)
in ComponentFactory.Krypton.Toolkit.ViewManager.MouseUp(MouseEventArgs e)
in ComponentFactory.Krypton.Toolkit.VisualControl.OnMouseUp(MouseEventArgs e)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
in System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
in System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
in System.Windows.Forms.Form.ShowDialog()
in RuredilManager.frmMain._ManageAppointment(String Description) in C:\Documents and Settings\luke\Desktop\RuredilManager\RuredilManager\frmMain.cs:riga 162
in RuredilManager.frmMain.schMain_AppointmentChanged(Object sender, AppointmentChangeEventArgs e) in C:\Documents and Settings\luke\Desktop\RuredilManager\RuredilManager\frmMain.cs:riga 195
in Janus.Windows.Schedule.AppointmentChangeEventHandler.Invoke(Object sender, AppointmentChangeEventArgs e)
in Janus.Windows.Schedule.Schedule.OnAppointmentChanged(AppointmentChangeEventArgs e)
in Janus.Windows.Schedule.Schedule.a(ScheduleAppointment , AppointmentChange )
in Janus.Windows.Schedule.ScheduleAppointment.set_Text(String value)
in Janus.Windows.Schedule.Schedule.a(JNSN )
in Janus.Windows.Schedule.Schedule.w()
in Janus.Windows.Schedule.Schedule.y()
in Janus.Windows.Schedule.JNSN.ProcessDialogKey(Keys keyData)
in System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
in System.Windows.Forms.Control.PreProcessMessage(Message& msg)
in System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
in System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
in System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
in System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
in System.Windows.Forms.Application.Run(Form mainForm)
in RuredilManager.Program.Main() in C:\Documents and Settings\luke\Desktop\RuredilManager\RuredilManager\Program.cs:riga 17
in System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
in System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
in System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
in System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
in System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
Name and version of the database you are using:DB2 UDB for iSeries
|