|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2009-12-21 19:09:25
Posts: 111,
Visits: 839
|
|
Hi everyone,
Maybe I'm doing something wrong here, but this is the error I've been dealing with:
When I try to execute the folowing OCL (self.Ordens.TarefaProject->select(Enabled)->orderBy(TaskID)) a exception is thrown. I've added several error messages and print screens to this post to help explain myself.
I hove that some one can help me.
Thanks in advance.
--
Pedro Brown
pedro@tectrilha.com.br
Tectrilha Software - Borland Learning Partner
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2009-12-21 19:09:25
Posts: 111,
Visits: 839
|
|
Hi,
Could someone help me on this? if you take a look at the SQL statement (attached), you will notice that it will attempt to select several objects using a IN clause. Could that be the problem?
--
Pedro Brown
pedro@tectrilha.com.br
Tectrilha Software - Borland Learning Partner
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2009-12-21 19:09:25
Posts: 111,
Visits: 839
|
|
Hi everyone,
Can someone help me on this? It's very frustating as it prevents me from moving on with my project. I tested with MSSQL and the same error occurs.
I'll try to explain the problem:
1) Model: SS 0..1 -- 0..* OS 0..1 -- 0..* Task
2) At some point, I have a SS Object and I try to execute ActionLanguage.Execute(SS.AsIObject, 'self.OSs.Tasks->collect(Enabled := false)');
And then the hole problem happens as it appears thar ECO generates de SQL select statement without the Parameters, just select someting from somewhere where ECO_ID in ( , , , , , )
Please tell me if I'm making some kid of mistake.
--
Pedro Brown
pedro@tectrilha.com.br
Tectrilha Software - Borland Learning Partner
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2009-12-21 19:09:25
Posts: 111,
Visits: 839
|
|
Hi,
I attached the error screen.
Here is the Stack Trace:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +2668969
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +717
Eco.Persistence.IPersistenceMapper.Fetch(ObjectIdList idList, Datablock& datablock, Int32[] memberIdList, FetchStrategy fetchStrategy) +0
Eco.Persistence.Remoting.ClientMapperImpl.Eco.Persistence.IPersistenceMapper.Fetch(ObjectIdList idList, Datablock& datablock, Int32[] memberIdList, FetchStrategy fetchStrategy) in c:\dev\e4vs\source\Public.CLR\Persistence\PersistenceMapperClient.cs:141
Eco.Internal.TBoldSystemPersistenceHandler.Fetch(Locator[] locators, Int32[] members, FetchStrategy FetchStrategy) in source\ObjectSpace\BORepresentation\BoldSystemPersistenceHandler.pas:420
Eco.Services.Impl.PersistenceServiceImpl.Eco.Services.IPersistenceService.EnsureRange(IObjectList objects, Int32 fromIndex, Int32 toIndex) in c:\dev\e4vs\source\Public.CLR\ServicesImpl\PersistenceServiceImpl.cs:242
Eco.Services.ObjectListHelper.EnsureFetchedPage(IObjectList list, IObject obj, Int32 index) in c:\dev\e4vs\source\Public.CLR\Interfaces\Services.cs:1867
Eco.ObjectRepresentation.Impl.ObjectCollectionImpl.GetByIndex(Int32 index) in c:\dev\e4vs\source\Public.CLR\ElementImpl\ObjectCollectionImpl.cs:169
Eco.ObjectRepresentation.Impl.ObjectCollectionImpl.Eco.ObjectRepresentation.IObjectList.get_Item(Int32 index) in c:\dev\e4vs\source\Public.CLR\ElementImpl\ObjectCollectionImpl.cs:182
Eco.Web.AutoFormDataGrid.UpdateList(IObjectList list) in c:\dev\e4vs\source\Public.CLR\Handles\Asp\MultiLinkBuilder.cs:128
Eco.Web.MultiLinkBuilder.MakeNewDataGrid(String controlName, Control host, HttpRequest request, HttpSessionState session, EcoSpace ecoSpace, IObjectList list, String ownerId, Int32 ownerProperty, Boolean selector, String className, IProperty prop) in c:\dev\e4vs\source\Public.CLR\Handles\Asp\MultiLinkBuilder.cs:217
Eco.Web.AutoForm.BuildObjectList(String ownerId, Int32 ownerProperty, String className) in c:\dev\e4vs\source\Public.CLR\Handles\Asp\AutoForm.cs:309
Eco.Web.AutoForm.SetupPage() in c:\dev\e4vs\source\Public.CLR\Handles\Asp\AutoForm.cs:130
Eco.Web.AutoForm.Page_Load(Object sender, EventArgs e) in c:\dev\e4vs\source\Public.CLR\Handles\Asp\AutoForm.cs:47
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436
Thanks
--
Pedro Brown
pedro@tectrilha.com.br
Tectrilha Software - Borland Learning Partner
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2010-06-15 10:49:25
Posts: 177,
Visits: 747
|
|
Hi Pedro,
Have you reported this as a bug? It seems to be incorrect at first glance.
Scott
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2009-12-21 19:09:25
Posts: 111,
Visits: 839
|
|
Hi Scott,
I don't know. It seems such a common scenario, just retrieving some data from a table. The only thing that changed is that now I have a few hundred lines.
The application that I'm writing performs import and export operations, so I can't run away from loading this amount of data.
Do you really think it is a bug?
Thanks
--
Pedro Brown
pedro@tectrilha.com.br
Tectrilha Software - Borland Learning Partner
|
|
|
|
|
Supreme Being
      
Group: Administrators
Last Login: 2010-08-23 23:54:43
Posts: 1 228,
Visits: 1 374
|
|
I dont know exactly what is wrong, but it is obvious that the generated SQL is invalid. If the persistencemapper is able to load data in other cases, it is likely that what has happened is that you have passed the magic number where ECO switches from using parameters to literal IDs in the "where-statement".
While I would like to know exactly why this causes invalid SQL, I can offer you a workaround until we have figured this out. There is a property that controls this magic number:
persistenceMapperMySql1.SqlDatabaseConfig.MaxParamsInIdList
Set this value to 250 (same as the property FetchBlockSize). this will force ECO to always pass the values for the primary keys as parameters.
Now, to solve the actual problem, I need to know which build you are using, and whether you have any custom O/R mapping in your application. I have recently been testing large amounts of data with MySql (in Eco5), and not seen this particular problem...
/Jonas Hogstrom [CapableObjects]
|
|
|
|