-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot use name of field converted with a CompositeAttributeConverter
in converted map
#932
Comments
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes neo4j#932
Currently blocked by neo4j/neo4j-ogm#932
Thanks for reporting this and I am happy to review your PR.
The first operation will succeed, I am pretty sure for this. But the second does not because it pulls the Renaming the Java Just wanted to leave this here as a general summary of what the root problem is. |
Thanks for the quick feedback
Yes, you are correct :) It seems that for all other graph properties that are put in by the composite converter, the
Hehe, yes exactly :)
|
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes neo4j#932
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes neo4j#932
Currently blocked by neo4j/neo4j-ogm#932
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes #932
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes neo4j#932
…eProperty` This allows to resolve conflicts when a property is using a composite converter. Fixes #932
Currently blocked by neo4j/neo4j-ogm#932
In our project, we are trying to analyse source code in a graph structure. Each source code element is represented as a
Node
. EachNode
has aname
attribute, which is not a string, but a specialName
class. This is primarily for reasons such as parsing of fully qualified names (e.g.MyClass::test
). To serialise this special class, we have written aCompositeAttributeConverter
that serialises the individual elements into a map of strings (fullName
,delimiter
,localName
). However, we want also want to serialise a string representation into a property calledname
(the same as the original field name). While this works perfectly when serialising into the graph; it does not when we try to load a node again.Expected Behavior
I would expect the OGM to recognise the field
name
as part of the converted set of attributes and that thetoEntityAttribute
is called.Current Behavior
Currently, OGM recognises
name
as a field property and tries to directly set the string value to the Java object, without consulting the composite attribute converter. If I remove thename
key from the map, everything works.The
writeProperty
function would even know that a composite converter is in place, however that information is not used (either in the function directly or above).Your Environment
The text was updated successfully, but these errors were encountered: