Duplicate procedure functions across projects when using 'AsSeparateProjects' group usage

Posts   
 
    
MJC
User
Posts: 50
Joined: 06-May-2004
# Posted on: 01-May-2019 01:45:46   

I've attached the pre-requisite attachments to visualize the issue.

I have two catalogs imported into a project, where 1 catalog has all its schema items mapped in one group (Northwind), and the other catalog into another group (Pubs).

When I generate the source code, using Group usage = 'AsSeparateProjects' and the preset 'SD.Presets.Adapter.General.Netstandard', it creates a RetrievalProcedures.cs file in each DatabaseSpecific csproj project which duplicates the functions that return the IRetrievalQuery from the first llblgen group in the second group.

So for example, the Northwind group has a "TenMostExpensiveProducts" stored procedure call. After code generation, the Pubs project has a RetrievalProcedures.cs file with methods like 'GetQueryForTenMostExpensiveProductsResultTypedView' and 'FetchTenMostExpensiveProductsResultTypedView' which don't belong in this project.

So when compiling, I get errors like:

'RetrievalProcedures.cs(297,31): error CS0103: The name 'CreateTenMostExpensiveProductsCall' does not exist in the current context', as this method is only in the Northwind project, not the Pubs project.

Is it just a matter of setting the cleanCache property in the preset somewhere? I just figure this should work out of the box on a new v5.5 clean install.

Attachments
Filename File size Added on Approval
Screenshot 2019-04-30 18.26.50.png 252,006 01-May-2019 01:47.27 Approved
Screenshot 2019-04-30 18.27.07.png 22,508 01-May-2019 01:47.33 Approved
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 01-May-2019 07:32:49   

Hi MJC,

Indeed it looks weird. What build version are you using? (LLBLGen Designer -> Help -> About) Is it possible for you to attach your LLBLGen project so we can take a look at your setup and catalog?

David Elizondo | LLBLGen Support Team
daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 01-May-2019 08:32:33   

I tried the following scenario: - New LLBLGen project using lates v5.5.2 (07-Mar-2019) - Added two catalogs from my local SQLServer (Northwind and Pubs) - Reverse Engineer all NW entities and SP objects into my model in NW group - Reverse Engineer all Pubs entities and SP objects into my model in Pubs group - Set the project setting GroupUsage as AsSeparateProjects - Generate code using NetStandard preset. Everything gets generated into the right project. - Compile all projects. All projects compiled just fine.

Please make sure you are not seeing old generated files. To make sure try to generate to an empty folder.

If the problem persists please show us your project and confirm the version you are using.

David Elizondo | LLBLGen Support Team
MJC
User
Posts: 50
Joined: 06-May-2004
# Posted on: 01-May-2019 16:10:37   

_Using 5.5 (5.5.2) RTM, March 7. _ I regenerated to a new folder, and still seeing the issue. I'm attaching my project file.

Attachments
Filename File size Added on Approval
NWP.Data.llblgenproj 144,038 01-May-2019 16:10.48 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 01-May-2019 16:26:34   

We'll look into it.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 01-May-2019 16:33:56   

It indeed doesn't compile properly. Strange.... we'll look into what's going on...

It looks like the retrievalprocedures classes are swapped or something, the ones in nw are in the one for pubs and vice versa. Which suggests some filter error that could be as simple as a '!' where it shouldn't be flushed

(edit) they're simply emitted in both groups so it's not a simple bad filter. There are filters in place, but apparently not working in this particular case. (entities etc. are filtered out properly, only stored procedures aren't).

Will be tomorrow (thursday) before we have a fix tho..

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 02-May-2019 12:10:44   

Bug in code generator, doesn't apply proper filter on typed views to traverse.

(edit) Fixed in next hotfix builds 5.4.6 and 5.5.3. We've to deal with 1 other issue before we'll push new builds to the website, stay tuned.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
# Posted on: 02-May-2019 15:14:40   

Hotfix for 5.4.6 and 5.5.3 is now available, fixing this issue simple_smile

Frans Bouma | Lead developer LLBLGen Pro
MJC
User
Posts: 50
Joined: 06-May-2004
# Posted on: 02-May-2019 18:21:31   

Awesome, works nicely, thanks for the fix!