Skip to content

A Java 8 library that implements the back-relationship update feature for a Spring Data REST project

License

Notifications You must be signed in to change notification settings

masvis/spring-data-rest-backrelation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Data REST Backrelation

A Java 8 library that implements the update feature for a Spring Data REST project when a POST, PATCH, PUT or DELETE method is invoked on a mappedBy @ManyToMany annotated field.


Simple usage

Check the test folder for a fast implementation of the library. Remember to:

  • Annotate the @SpringBootApplication class with the @EnableHandledBackrelations annotation;
  • Implement a BackrelationHandler as in CompanyCityBackrelationHandler test;
  • Annotate a @ManyToMany(mappedBy=frontRelationField) field with a @HandledBackrelation annotation setting the correct BackrelationHandler bean type value.