OutputType default

Posts   
 
    
Stevenn
User
Posts: 30
Joined: 26-Sep-2007
# Posted on: 17-Jan-2020 13:30:20   

Hi

There seems to be an anomaly with OutputType defaults (TypedList and TypedView). In the 5.6.1 (4-Sep) RTM (or possibly because i upgraded from 5.4), in Designer Preferences, the default was PocoWithQuerySpecQuery.

Now (5.6.1 21-Oct)), those options have disappeared out of the Designer Preferences completely and are only available in the Project Settings: Conventions | Entity Model | LLBLGen Pro Runtime Framework. They still default to PocoWithQuerySpecQuery though the documentation states that TypedDataTable should be the default. Will we have to set these per project into the future?

Thanks

Steven

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 17-Jan-2020 15:37:53   

Stevenn wrote:

Hi

There seems to be an anomaly with OutputType defaults (TypedList and TypedView). In the 5.6.1 (4-Sep) RTM (or possibly because i upgraded from 5.4), in Designer Preferences, the default was PocoWithQuerySpecQuery.

This is a framework specific setting and these have never been in the designer preferences, sorry. I checked, e.g. with 5.5, not there. This is also logical as the code to display these doesn't refer any framework as that's unknown at that level, e.g. when you start the designer but don't load a project, it can't show you any framework specific settings...

The defaults for framework specific settings are part of the project, and have been part of the project since v5.0

Now (5.6.1 21-Oct)), those options have disappeared out of the Designer Preferences completely and are only available in the Project Settings: Conventions | Entity Model | LLBLGen Pro Runtime Framework. They still default to PocoWithQuerySpecQuery though the documentation states that TypedDataTable should be the default. Will we have to set these per project into the future?

You have to set the default per project yes, as at the preferences level, it's unknown what framework you're going to use.

If you run into this at a point where there already elements defined and you want to set the setting to e.g. PocoWithLinqQuery, just change the default in the project settings. Unless you have changed the value for an element specifically, you can just change the default in the project settings and all elements inherit that value.

Could you point us to the documentation fragment that's stating TypedDataTable should be used? Thanks. (We set the default to PocoWithQuerySpecQuery some time ago as it's more efficient than using a typed datatable)

Frans Bouma | Lead developer LLBLGen Pro
Stevenn
User
Posts: 30
Joined: 26-Sep-2007
# Posted on: 17-Jan-2020 15:59:10   

Hi Frans

Okay, seems i may have been mixed up between Design Prefs, Project Settings and Typed List settings for the individual typed list. Either way, that is sorted now. I'll just have to remember to change them for every project into the future.

For the documentation: https://www.llblgen.com/Documentation/5.4/LLBLGen%20Pro%20RTF/Using%20the%20generated%20code/Adapter/Using%20TypedViews,%20TypedLists%20and%20Dynamic%20Lists/gencode_usingtypedlist_adapter.htm

Under Choosing the TypedList class type:

Choosing the Typed List class type
Which class is generated for a Typed List is determined by its OutputType setting. This setting is found on the Typed List's Code gen. Info tab in the designer and its default value is obtained from the TypedListOutputTypeDefault setting located in the LLBLGen Pro framework section of the Project Settings. There are three values to choose from:

TypedDataTable (default)
PocoWithLinqQuery
PocoWithQuerySpecQuery
The default is TypedDataTable, which will result in what has been the case since the beginning:

Same for 5.5 and 5.6 links. Okay, this is my first project using 5.x, i see that 4.2 defaults to TypedDataTable.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 17-Jan-2020 17:24:55   

Thanks for the pointer, we'll correct that in the docs simple_smile

4.2 indeed defaulted to typed datatable, but it's outdated tech and fetching it is slower than a poco with queryspec or linq so we decided to flip the result. If you load a project from 4.2 it's still typeddatatable tho. New projects are using the new default.

Frans Bouma | Lead developer LLBLGen Pro
Stevenn
User
Posts: 30
Joined: 26-Sep-2007
# Posted on: 21-Jan-2020 08:18:04   

Otis wrote:

4.2 indeed defaulted to typed datatable, but it's outdated tech and fetching it is slower than a poco with queryspec or linq so we decided to flip the result. If you load a project from 4.2 it's still typeddatatable tho. New projects are using the new default.

I suppose i will have to bite the bullet and start looking at queryspec. I'm not a fan of the format at all, but progress, i guess. confused

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39760
Joined: 17-Aug-2003
# Posted on: 21-Jan-2020 09:05:49   

You can also select poco with linq query if that's what you prefer. Or keep using a typed datatable. simple_smile It's not going away, we just changed the default.

Frans Bouma | Lead developer LLBLGen Pro