Announcement Announcement Module
Collapse
No announcement yet.
Spring Data Graph 1.0.0.M5: Fields that can't be persisted are silently ignored? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    Comment

    Working...
    X