Double code on Typed Views

Posts   
 
    
Darwin avatar
Darwin
User
Posts: 38
Joined: 12-Apr-2005
# Posted on: 06-Aug-2005 00:50:52   

FieldIndex, PredicateFactorys, and SortClauseFactory.Create are defined twice in generated code for Typed Views. Every time I regenerate code I have to manually go delete the duplicate.

What am I doing wrong?

Thanks, Darwin

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 06-Aug-2005 11:15:01   

You have an entity which is mapped onto a view which is also a typed view, and their name is the same? If so, rename one of them.

Frans Bouma | Lead developer LLBLGen Pro
Darwin avatar
Darwin
User
Posts: 38
Joined: 12-Apr-2005
# Posted on: 06-Aug-2005 23:50:17   

You were right! There was an entity AND a typed view created for every view in the database. Did I accidentaly "turn on" the creation of entities for views? How do fix this?

Thanks, Darwin

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 07-Aug-2005 11:42:47   

Darwin wrote:

You were right! There was an entity AND a typed view created for every view in the database. Did I accidentaly "turn on" the creation of entities for views? How do fix this?

Thanks, Darwin

There are 2 ways to add new entities: one grabs all entities for tables, the other one grabs all entities for views, you must have clicked that one too simple_smile .

To fix this, rename either the entities mapped onto the views, or rename the typed views on the views which also have an entity mapped onto them simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Darwin avatar
Darwin
User
Posts: 38
Joined: 12-Apr-2005
# Posted on: 10-Aug-2005 22:39:24   

Every time I refresh from the catalog the views are brought in as Typed Views AND as Entities. Is there a setting that controls this?

At least now I know so I can delete the entities after a refresh before generating code!

Thanks, Darwin

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 10-Aug-2005 23:13:50   

Darwin wrote:

Every time I refresh from the catalog the views are brought in as Typed Views AND as Entities. Is there a setting that controls this?

At least now I know so I can delete the entities after a refresh before generating code!

Thanks, Darwin

Yes it's a setting in the preferences: AddNewViewsAsEntitiesAfterRefresh. Set it to false simple_smile

Frans Bouma | Lead developer LLBLGen Pro