trinity-rdf icon indicating copy to clipboard operation
trinity-rdf copied to clipboard

Is it mandatory to use attributes for resources description?

Open IgorKaplya opened this issue 3 years ago • 1 comments

When I use resources that have no [RdfClass] attribute like Model.AsQueryable<R>.Skip(0).Take(5).ToList; I get an exception:

[DotToken at Line 1 Column 129 to Line 1 Column 130] Unexpected DOT in graph pattern.

Note: I used alternative method to describe resources, overriding GetType and assigning MappingProperty<>.

Generated SPARQL query is missing the part where SPO is filtered against RDF type:

I've pushed some test code in my fork: branch: https://github.com/IgorKaplya/trinity-rdf/tree/SPARQL-not-generated-without-attribute fixture: LinqTestBase test: CanSelectResourcesWithAsQueryableWithoutAttributes

For now I have to use both: Attribute and the approach with GetType().

IgorKaplya avatar Nov 05 '21 15:11 IgorKaplya