Add label to node sdnrx

Hello,

I am trying to use sdn rx in my project.
How can i model my node in java to obtain labels when i load a node ?

@Node("App")
public class App {

    @Id
    @GeneratedValue
    Long id;
    @Property("name")
    String name;

    List<String> nodeLabels;


}

What i need is to add/remove labels to a node.

Thank you.

Your definition is quite right but it is just missing the @DynamicLabels annotation on your nodeLabels field. With this you can manage additional labels for your entity.

Please have a look here for more details: https://neo4j.github.io/sdn-rx/current/#dynamicorruntimemanagedlabels

Hello,

In which library can i find the @DynamicLabels ?
With this maven conf, i cant import the annotation :

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

Thank you

There is already a 1.1.0 of SDN-RX out there.
This will do the trick.

I have another question : i use another relational database in the same project and i read that it is not recomanded to use impeartive with reactive programing in the same project.
Do you think that i can use the rx library in this case ?

You can use it, there is no technical limitation in general.
But doing imperative operations during a reactive one is an anti-pattern.
Say you want to persist data through the reactive SDN-RX layer but the very same service method interacts also with the blocking relational database.

Just as a reminder: SDN-RX does also support imperative programming and you do not have to use the reactive parts of the framework. We develop both programming models in parallel, with a few limitations of course if one feature does not make sense in the reactive world or vice-versa.