- Home
- LLBLGen Pro
- Bugs & Issues
bucket.PredicateExpression.ToQueryText bug???
Posts
Posts: 41
Joined: 19-Nov-2006
Joined: 19-Nov-2006
# Posted on: 21-Mar-2007 03:09:01
FileVersion 2.0.7.122 Adapter SQL Server 2005
Hello,
I am having the error "DatabaseSpecificCreator object not set. Cannot create query part." when I try to use ToQueryText on a Predicate Expression.
Below is my code
//Sort
ISortExpression sort = new SortExpression();
sort.Add(TpPublicationsFields.PubSLibelle | SortOperator.Ascending);
//Filter Clause
RelationPredicateBucket bucket = new RelationPredicateBucket();
if (publicationType == TpPublicationsEntity.PublicationType.Publications)
bucket.PredicateExpression.Add(TpPublicationsFields.PubBGuidePermanent == false);
else
if (publicationType == TpPublicationsEntity.PublicationType.Guides)
bucket.PredicateExpression.Add(TpPublicationsFields.PubBGuidePermanent == true);
IPredicateExpression pe = new PredicateExpression();
foreach (TEditeursEntity editeur in user.SelectedEditeurs)
pe.AddWithOr(TpPublicationsFields.DocIIdEditeurPublications == editeur.DocIId);
bucket.PredicateExpression.Add(pe);
bucket.PredicateExpression.Add(TpPublicationsFields.PubBActive == true);
int marker = 0;
Console.WriteLine(bucket.PredicateExpression.ToQueryText(ref marker));
Below is my stacktrace:
System.ApplicationException was unhandled
Message="DatabaseSpecificCreator object not set. Cannot create query part."
Source="SD.LLBLGen.Pro.ORMSupportClasses.NET20"
StackTrace:
at SD.LLBLGen.Pro.ORMSupportClasses.PredicateExpression.ToQueryText(Int32& uniqueMarker, Boolean inHavingClause)
at SD.LLBLGen.Pro.ORMSupportClasses.PredicateExpression.ToQueryText(Int32& uniqueMarker)
at Aldabra.Magellan.Repository.ListRepository.GetTpPublicationsCollection(PublicationType publicationType, IMagellanUser user) in D:\Aldabra.com\BL\Repository\Aldabra.Magellan.Repository.ListRepository\ListRepository.cs:line 41
at Aldabra.Magellan.Smartclient.SearchArticleModule.SearchViewPresenter.DoBindingOnView() in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Module\SearchArticleModule\Views\SearchView\SearchViewPresenter.cs:line 50
at Aldabra.Magellan.Smartclient.SearchArticleModule.SearchViewPresenter.OnViewReady() in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Module\SearchArticleModule\Views\SearchView\SearchViewPresenter.cs:line 62
at Aldabra.Magellan.Smartclient.SearchArticleModule.SearchView.OnLoad(EventArgs e) in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Module\SearchArticleModule\Views\SearchView\SearchView.cs:line 78
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at 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)
at 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)
at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Form.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.Show()
at Aldabra.Magellan.Smartclient.Infrastructure.Interface.MdiWorkspace.OnShow(Control smartPart, WindowSmartPartInfo smartPartInfo) in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Infrastructure.Interface\UI\MdiWorkspace.cs:line 43
at Microsoft.Practices.CompositeUI.SmartParts.Workspace`2.Show(Object smartPart, ISmartPartInfo smartPartInfo)
at Microsoft.Practices.CompositeUI.SmartParts.Workspace`2.Show(Object smartPart)
at Aldabra.Magellan.Smartclient.Infrastructure.Interface.LauncherWorkItemController.LaunchChildForm[T](String title, WorkItem rootWorkitem) in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Infrastructure.Interface\LauncherWorkItemController.cs:line 76
at Aldabra.Magellan.Smartclient.Infrastructure.Interface.LauncherWorkItemController.LaunchChildForm[T](String title) in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Infrastructure.Interface\LauncherWorkItemController.cs:line 48
at Aldabra.Magellan.Smartclient.SearchArticleModule.ModuleController.OnRechercheArticleClick(Object sender, EventArgs e) in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Module\SearchArticleModule\ModuleController.cs:line 63
at Microsoft.Practices.CompositeUI.Commands.Command.OnExecuteAction(Object sender, EventArgs e)
at Microsoft.Practices.CompositeUI.Commands.CommandAdapter.FireCommand()
at Microsoft.Practices.CompositeUI.Commands.EventCommandAdapter`1.InvokerEventHandler(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Practices.CompositeUI.WinForms.FormShellApplication`2.Start()
at Aldabra.Magellan.Smartclient.Infrastructure.Shell.ShellApplication.Start() in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Shell\ShellApplication.cs:line 139
at Microsoft.Practices.CompositeUI.CabApplication`1.Run()
at Aldabra.Magellan.Smartclient.Infrastructure.Shell.ShellApplication.RunInDebugMode() in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Shell\ShellApplication.cs:line 173
at Aldabra.Magellan.Smartclient.Infrastructure.Shell.ShellApplication.Main() in D:\Aldabra.com\Client\SmartClient.Net\Magellan.net\Source\Infrastructure\Shell\ShellApplication.cs:line 164
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Do I miss something?
Posts: 14950
Joined: 21-Aug-2005
Joined: 21-Aug-2005
# Posted on: 21-Mar-2007 07:58:25
Please check the following thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=1159