Results 1 to 2 of 2

Thread: Spring Data Graph 1.0.0.M5: Fields that can't be persisted are silently ignored?

  1. #1
    Join Date
    Mar 2011
    Posts
    1

    Default 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. #2
    Join Date
    Jan 2011
    Location
    Dresden, Germany
    Posts
    525

    Default

    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
  •