No reference defined for type SD.LLBLGen.Pro.DBDriverCore.SpatialGeometry

Posts   
 
    
Posts: 3
Joined: 16-Apr-2025
# Posted on: 16-Apr-2025 12:52:11   

Hello,

I'm using 5.12 (5.12.0) RTM, generating code for Postgresql against dotnet 9.0 using database first.

The database has columns defined with type geometry. LLBLGen reads the schema correctly and generates mapping classes that show the geometry type:

public NetTopologySuite.Geometries.Geometry Zoneshape { get; set; }

The constructor of the class that contains this property, has the following line:

this.Zoneshape = default(SD.LLBLGen.Pro.DBDriverCore.SpatialGeometry);

The last line fails with missing reference. I tried to find the assembly that contains the type SD.LLBLGen.Pro.DBDriverCore.SpatialGeometry and I can't find it. I can see the type referenced in the documentation here (https://www.llblgen.com/Documentation/5.12/ReferenceManuals/Designer/html/AACD8A09.htm). But I cannot find the name of the assembly I need to reference to obtain this type.

So the question is: which nuget package do I need to reference here?

Best

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39848
Joined: 17-Aug-2003
# Posted on: 17-Apr-2025 08:57:35   

I think that's a bug in the templates (the type it generates is the placeholder from the designer, it should convert it to the real type when generating code), but what target ORM framework are you using?

Frans Bouma | Lead developer LLBLGen Pro
Posts: 3
Joined: 16-Apr-2025
# Posted on: 17-Apr-2025 10:40:24   

Otis wrote:

I think that's a bug in the templates, but what target ORM framework are you using?

I am generating code for EF Core against dotnet 9.

Target Framework Entity Framework Core v8

Target Platform dotnet 9

Template Group General

Selected Preset SD.EntityFramework.Core V8

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39848
Joined: 17-Aug-2003
# Posted on: 17-Apr-2025 11:25:19   

Thanks, we'll look into it

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39848
Joined: 17-Aug-2003
# Posted on: 17-Apr-2025 15:38:45   

It pops up when the field isn't nullable. Of course our tests used nullable geometry fields and this was missed.... flushed

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39848
Joined: 17-Aug-2003
# Posted on: 17-Apr-2025 17:04:03   

We've fixed this is in v5.12.1 and v5.11.5 hotfix builds which are now available. As the field isn't nullable, the default() statement won't result in a valid value anyway, so we've changed the code to init it with an empty geometry instance.

Frans Bouma | Lead developer LLBLGen Pro
Posts: 3
Joined: 16-Apr-2025
# Posted on: 18-Apr-2025 10:54:51   

Otis wrote:

We've fixed this is in v5.12.1 and v5.11.5 hotfix builds which are now available. As the field isn't nullable, the default() statement won't result in a valid value anyway, so we've changed the code to init it with an empty geometry instance.

Thank you for the quick fix!