-
Mar 26th, 2011, 08:42 PM
#1
Spring Data Graph 1.0.0.M5: Fields that can't be persisted are silently ignored?
Hey,
I've been playing around with the Spring Data Neo4j support and ran into some unexpected behavior. I was not able to find anything in the docs, Jira or here.
My @NodeEntity annotated class has an enum type field and if i set it, persist the instance, and then recreate the instance with a NodeFinder the field now has a null value.
I assume this is because SDG doesn't know how to persist my enum type, but shouldn't there be a warning, exception or similar? This seem to be happening silently both on build and runtime, also when the field is annotated with @GraphProperty.
Br
-
Mar 27th, 2011, 03:18 AM
#2
Hi,
thanks for pointing that out. There is an "info" message for unhandled fields.
But anyway a enum field should be persisted to the graph as we're using Spring's conversion facilities and provide a EnumToStringConverter which is registered with our Neo4jConversionServiceFactoryBean.
Is the enum publicly accessible?
I will change the "info" message to a warning.
Cheers
Michael
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules