I tried it but if I add select odl NHbernate raise ana exception updating (!?) OrdineDiLavoro...why it do an UPDATE ??
Exception :
Code:
{"could not update: [FinitenessEvo.Domain.OrdineDiLavoro#FinitenessEvo.Domain.OrdineDiLavoro][SQL: UPDATE detcom SET codnot = ?, codchi = ?, codte1 = ?, codte2 = ?, codore = ?, codmin = ?, codstx = ?, codacl = ?, codatr = ?, codaco = ?, codcom = ?, codacc = ?, codaut = ?, codtip = ?, codpgm = ?, codinl = ?, codcon = ?, cotetp = ?, cotei1 = ?, cotef1 = ?, coddet = ? WHERE clicod = ? AND coanno = ? AND conume = ?]"}
Inner exception :
Code:
{"Overflow di SqlDateTime. Deve essere compreso tra 1/1/1753 12:00:00 AM e 12/31/9999 11:59:59 PM."}
Stack trace :
Code:
in NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Object[] oldFields, Boolean[] includeProperty, Int32 j, Object oldVersion, Object obj, SqlCommandInfo sql, ISessionImplementor session)
in NHibernate.Persister.Entity.AbstractEntityPersister.Update(Object id, Object[] fields, Int32[] dirtyFields, Boolean hasDirtyCollection, Object[] oldFields, Object oldVersion, Object obj, ISessionImplementor session)
in NHibernate.Impl.ScheduledUpdate.Execute()
in NHibernate.Impl.SessionImpl.Execute(IExecutable executable)
in NHibernate.Impl.SessionImpl.ExecuteAll(IList list)
in NHibernate.Impl.SessionImpl.Execute()
in NHibernate.Impl.SessionImpl.AutoFlushIfRequired(ISet querySpaces)
in NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar)
in NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters, IList results)
in NHibernate.Impl.SessionImpl.Find[T](String query, QueryParameters parameters)
in NHibernate.Impl.QueryImpl.List[T]()
in FinitenessEvo.GUI.frmShowGantt.RefreshUsers() in C:\Documents and Settings\luke\Desktop\Finiteness Evo\Finiteness Evo\frmShowGantt.cs:riga 184
in FinitenessEvo.GUI.frmShowGantt.frmShowGantt_Load(Object sender, EventArgs e) in C:\Documents and Settings\luke\Desktop\Finiteness Evo\Finiteness Evo\frmShowGantt.cs:riga 39
in System.Windows.Forms.Form.OnLoad(EventArgs e)
in ComponentFactory.Krypton.Toolkit.KryptonForm.OnLoad(EventArgs e)
in System.Windows.Forms.Form.OnCreateControl()
in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
in System.Windows.Forms.Control.CreateControl()
in System.Windows.Forms.Control.WmShowWindow(Message& m)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
in System.Windows.Forms.ContainerControl.WndProc(Message& m)
in System.Windows.Forms.Form.WmShowWindow(Message& m)
in System.Windows.Forms.Form.WndProc(Message& m)
in ComponentFactory.Krypton.Toolkit.VisualForm.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.IntCreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
in System.Windows.Forms.UnsafeNativeMethods.CreateWindowEx(Int32 dwExStyle, String lpszClassName, String lpszWindowName, Int32 style, Int32 x, Int32 y, Int32 width, Int32 height, HandleRef hWndParent, HandleRef hMenu, HandleRef hInst, Object pvParam)
in System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
in System.Windows.Forms.Control.CreateHandle()
in System.Windows.Forms.Form.CreateHandle()
in System.Windows.Forms.Control.get_Handle()
in System.Windows.Forms.Form.SetVisibleCore(Boolean value)
in System.Windows.Forms.Control.Show()
in FinitenessEvo.GUI.frmHome.menuProgrammazioneGantt_Click(Object sender, EventArgs e) in C:\Documents and Settings\luke\Desktop\Finiteness Evo\Finiteness Evo\frmHome.cs:riga 52
in FinitenessEvo.GUI.frmHome.toocmdGantt_Click(Object sender, EventArgs e) in C:\Documents and Settings\luke\Desktop\Finiteness Evo\Finiteness Evo\frmHome.cs:riga 68
in System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
in System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
in System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
in System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
in System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
in System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
in System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
in System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
in System.Windows.Forms.Control.WndProc(Message& m)
in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
in System.Windows.Forms.ToolStrip.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.Application.Run(Form mainForm)
in FinitenessEvo.GUI.Program.Main() in C:\Documents and Settings\luke\Desktop\Finiteness Evo\Finiteness Evo\Program.cs:riga 32
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()