Subtypes in TypedLists

Posts   
 
    
deathwish
User
Posts: 56
Joined: 07-Nov-2006
# Posted on: 18-Apr-2011 18:58:17   

I bought the update today and I'm busy with a migration from 2.6 to 3.1 and not having much fun: disappointed

1st thing - Is this bug http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=19233 fixed in 3.1?

Because any subtype in a typed list is giving "Relation at index 1 doesn't contain an entity already added to the FROM clause. Bad alias?"

type errors.

I made a new typed list which uses a subtype (never mind any relations)

Here is the stack trace:

[ORMRelationException: Relation at index 1 doesn't contain an entity already added to the FROM clause. Bad alias?]
   SD.LLBLGen.Pro.ORMSupportClasses.RelationCollection.PreprocessRelations() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\QueryApiElements\RelationCollection.cs:894
   SD.LLBLGen.Pro.ORMSupportClasses.RelationCollection.ToQueryTextInternal(Boolean ansiJoins, String& nonAnsiWhereClause, String nonAnsiRootTableReference, String nonAnsiFieldSuffix) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\QueryApiElements\RelationCollection.cs:382
   SD.LLBLGen.Pro.ORMSupportClasses.RelationCollection.ToQueryText() in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\QueryApiElements\RelationCollection.cs:324
   SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, IRetrievalQuery query, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Boolean relationsSpecified, Boolean sortClausesSpecified) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\SqlServerDQE\DynamicQueryEngine.cs:610
   SD.LLBLGen.Pro.ORMSupportClasses.DynamicQueryEngineBase.CreateSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, DbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\Persistence\DynamicQueryEngineBase.cs:1090
   SD.LLBLGen.Pro.DQE.SqlServer.DynamicQueryEngine.CreatePagingSelectDQ(IEntityFieldCore[] selectList, IFieldPersistenceInfo[] fieldsPersistenceInfo, DbConnection connectionToUse, IPredicate selectFilter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\SqlServerDQE\DynamicQueryEngine.cs:679
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateSelectDQ(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfoObjects, IPredicateExpression filter, Int64 maxNumberOfItemsToReturn, ISortExpression sortClauses, IRelationCollection relationsToWalk, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:4451
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.CreateQueryFromElements(IEntityFields2 fieldCollectionToFetch, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize, IFieldPersistenceInfo[]& persistenceInfo, IRetrievalQuery& selectQuery) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:4612
   SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchTypedList(IEntityFields2 fieldCollectionToFetch, DataTable dataTableToFill, IRelationPredicateBucket filterBucket, Int32 maxNumberOfItemsToReturn, ISortExpression sortClauses, Boolean allowDuplicates, IGroupByCollection groupByClause, Int32 pageNumber, Int32 pageSize) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\AdapterSpecific\DataAccessAdapterBase.cs:3066
   SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSourceView2.ExecuteSelectTypedList(Int32 pageSize, Int32 pageNumber, DataSourceSelectArguments arguments) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\DataSource\LLBLGenProDataSourceView2.cs:722
   SD.LLBLGen.Pro.ORMSupportClasses.LLBLGenProDataSourceView2.ExecuteSelect(DataSourceSelectArguments arguments) in c:\Myprojects\VS.NET Projects\LLBLGen Pro v3.1\Frameworks\LLBLGen Pro\RuntimeLibraries\ORMSupportClasses\DataSource\LLBLGenProDataSourceView2.cs:542
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +27
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
   Telerik.Web.UI.GridTableView.PerformSelect() +23
   Telerik.Web.UI.GridTableView.DataBind() +363
   Telerik.Web.UI.RadGrid.DataBind() +73
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +95
   System.Web.UI.Control.EnsureChildControls() +146
   System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +31
   Telerik.Web.UI.RadGrid.OnLoad(EventArgs e) +331
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Control.LoadRecursive() +191
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428

Secondly, when refreshing the catalog the typed lists (about 90%) are being renamed ala

"Typed List 'LogUser' has been renamed to 'LogUser_' because its name was already in use by another element in its group"

Why is it doing this? And please point me to the documentation explaining the concept of a group.

Then some general questions to prevent me from reverting and sticking to 2.6 (because it is stable and my appetite for unforseen bugs is very low)

  1. I read that there is a 25% speed improvement over 2.6 (True/False?)

  2. Will it be possible to generate a db schema to other database types once the model is happily upgraded? Ie I wish to evaluate MySQL or Postgres vs the current DB which is MS-SQL, and since you have the model first, maybe in a perfect world it is possible to create schema's for different database vendors.

Many thanks

deathwish
User
Posts: 56
Joined: 07-Nov-2006
# Posted on: 18-Apr-2011 19:01:13   

Just hold on - im debugging this... cant find the DELETE post button simple_smile

But please feel free to reply to my non bug related questions.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 19-Apr-2011 06:21:35   

deathwish wrote:

1st thing - Is this bug http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=19233 fixed in 3.1?

All fixes in older runtimes are present in today's runtime.

deathwish wrote:

Secondly, when refreshing the catalog the typed lists (about 90%) are being renamed ala

"Typed List 'LogUser' has been renamed to 'LogUser_' because its name was already in use by another element in its group"

Why is it doing this?

You have an element with the same name in the group. If you don't have custom groups, the default group ("{}") is the one that complains. If this happen when you do a refresh, please check this:

Maybe you you had an entity LogUser you renamed to LogUserSomeStuff, then you added a TypedList named LogUser. So far so good, but as long as you refresh, LogUserSomeStuff is reset to LogUser, then LogUser typedlist is renamed to LogUser_ because there is a name conflict (you can't apply the same name to two elements in the same group. Now, this automatic renaming is controlled by some properties. Please check the SyncRenamedMappedElementNamesAfterRefresh property value in your Project Properties.

deathwish wrote:

And please point me to the documentation explaining the concept of a group.

Here it's

deathwish wrote:

Then some general questions to prevent me from reverting and sticking to 2.6 (because it is stable and my appetite for unforseen bugs is very low)

  1. I read that there is a 25% speed improvement over 2.6 (True/False?)

Yes, it's faster. Here are the numbers

deathwish wrote:

  1. Will it be possible to generate a db schema to other database types once the model is happily upgraded? Ie I wish to evaluate MySQL or Postgres vs the current DB which is MS-SQL, and since you have the model first, maybe in a perfect world it is possible to create schema's for different database vendors.

Yes, it's possible: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=18716&StartAtMessage=0&#105020

David Elizondo | LLBLGen Support Team
deathwish
User
Posts: 56
Joined: 07-Nov-2006
# Posted on: 19-Apr-2011 14:51:22   

Okay I am guessing that if i have an entity

Called MyEntity

then i cannot have a typed list called MyEntity

cos thats what i see going on and the xml of the project file has no duplicates..

Is this correct?

MTrinder
User
Posts: 1461
Joined: 08-Oct-2008
# Posted on: 19-Apr-2011 21:29:53   

Object names have to be unique within a group, rather than within a project - so you can have two objects with the same name but they have to be in different groups.

Matt

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39908
Joined: 17-Aug-2003
# Posted on: 20-Apr-2011 09:42:00   

MTrinder wrote:

Object names have to be unique within a group, rather than within a project - so you can have two objects with the same name but they have to be in different groups.

Matt

IF the grouping setting in the project properties is set to different projects. If it's set to visual grouping mechanism (default), the name has to be unique within the project.

Frans Bouma | Lead developer LLBLGen Pro