File tree 1 file changed +4
-3
lines changed
src/Neo4j.Map.Extension/Map
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -109,12 +109,13 @@ private static string MatchQuery<T>(T node) where T : Neo4jNode
109
109
foreach ( PropertyInfo propInfo in node . GetType ( ) . GetProperties ( BindingFlags . Instance | BindingFlags . Public | BindingFlags . DeclaredOnly ) )
110
110
{
111
111
Neo4jPropertyAttribute attr = propInfo . GetCustomAttribute < Neo4jPropertyAttribute > ( ) ;
112
- if ( attr != null )
112
+ var value = propInfo . GetValue ( node ) ;
113
+ if ( attr != null && value != null )
113
114
{
114
115
if ( propInfo . PropertyType . IsEnum )
115
- values . Add ( attr . Name , TryGetEnumValueDescription ( propInfo , propInfo . GetValue ( node ) ) ) ;
116
+ values . Add ( attr . Name , TryGetEnumValueDescription ( propInfo , value ) ) ;
116
117
else
117
- values . Add ( attr . Name , propInfo . GetValue ( node ) ) ;
118
+ values . Add ( attr . Name , value ) ;
118
119
}
119
120
}
120
121
foreach ( KeyValuePair < string , object > keyValue in values )
You can’t perform that action at this time.
0 commit comments