Skip to content

Commit

Permalink
Compensating issue with dotNetRDF's TriGWriter issue that tries to co…
Browse files Browse the repository at this point in the history
…mpare literal with Uri nodes by converting the former to the Uri. Also minor refactorization.
  • Loading branch information
alien-mcl committed Jul 2, 2016
1 parent ab8f8e5 commit 37f5897
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion RomanticWeb.dotNetRDF/FileTripleStore.cs
Expand Up @@ -152,7 +152,7 @@ private void CreateIOHandlers(string extension)
break;
case ".trig":
_storeReader = new TriGParser();
_storeWriter = new TriGWriter();
_storeWriter = new TriGWriter() { CompressionLevel = -1 };
break;
case ".xml":
_rdfReader = new RdfXmlParser();
Expand Down
13 changes: 5 additions & 8 deletions RomanticWeb/Mapping/Extensions.cs
Expand Up @@ -76,14 +76,11 @@ public static IPropertyMapping FindPropertyMapping(this IMappingsRepository mapp
[return: AllowNull]
public static IPropertyMapping FindPropertyMapping(this IMappingsRepository mappingsRepository, Type declaringType, string propertyName)
{
IEntityMapping entityMapping = mappingsRepository.FindEntityMapping(declaringType);
IPropertyMapping result = null;
if (entityMapping != null)
{
result = entityMapping.PropertyFor(propertyName);
}

return result;
return (from entityMapping in mappingsRepository
where (entityMapping.EntityType == declaringType) || (declaringType.IsAssignableFrom(entityMapping.EntityType))
from propertyMapping in entityMapping.Properties
where propertyMapping.Name == propertyName
select propertyMapping).FirstOrDefault();
}

/// <summary>Searches for entity mappings.</summary>
Expand Down

0 comments on commit 37f5897

Please sign in to comment.