java - Spring JPA and remove entries from @ManyToMany -


as touched on in following:

when removing entries @manytomany mappings, there element of manual tweaking involved remove foreign keys.

i have been using own jpa crud years , have nice solution this: cruddao e.g. notedao.

but i've been impressed spring jpa , ability autogenerate cruds declaring interface , creating named namedquerys on @entity.

but how fix @manytomany remove problem? i'll have remove methods on crud expose "feature" of jpa.

i appear have solved using @preremove, noted in https://stackoverflow.com/a/14911910/1041691

e.g. https://github.com/fommil/zibaldone/blob/master/src/main/java/com/github/fommil/zibaldone/note.java#l74


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -