neo4j / sdn-rx

Nextgen Spring Data module for Neo4j supporting (not only) reactive data access and immutable support
https://neo4j.github.io/sdn-rx
Apache License 2.0
65 stars 23 forks source link

Getting "Unable to convert com.some.Some$SomeEnum to Neo4j Value." #202

Closed bojanv55 closed 4 years ago

bojanv55 commented 4 years ago

Using:

                 <dependency>
            <groupId>org.neo4j.springframework.data</groupId>
            <artifactId>spring-data-neo4j-rx-spring-boot-starter</artifactId>
            <version>1.0.0</version>
        </dependency>

and SpringBoot with my repo that extends ReactiveNeo4jRepository<Some, String> {

where

@Data
@Node
public class Some {
    @Id
    private SomeEnum naziv;

    @AllArgsConstructor
    @Getter
    public enum SomeEnum {
        MY("my"),

and getting that exception that it cannot convert Enumeration to value.

meistermeier commented 4 years ago

Thanks for reporting this. It seems that the implicit converter does not get called for identifier. On the other hand it seems only for a hand full of nodes a good idea to use enums as identifiers.

meistermeier commented 4 years ago

Decision: Let's convert also the id types transparently.