Categories
Mastering Development

How to avoid updation of Table A (lsa_line_of_business) while updating Table B (lsa_skill) alone using saveOrUpdate()?

My application’s database has two master tables. lsa_line_of_business & lsa_skill . Both tables are populated by insert statements execution in PostgreSQL Database (9.6.12) . But, We have option to Update one skill at a time (updation of single record in lsa_skill table) from UI. When I do so, it is also updating lsa_line_of_business table also […]

Categories
Development

Referencing a join table to a view

I have an entity MorningMinutesNote which has a @ManyToMany relationship with MorningMinutesNoteType using a join table morning_minutes_note_item_type. @Entity @Table(name = “morning_minutes_note”, schema = “public”) public class MorningMinutesNote { private List<MorningMinutesNoteType> itemTypes = new ArrayList<MorningMinutesNoteType>(); @ManyToMany @JoinTable(name=”morning_minutes_note_item_type”, joinColumns=@JoinColumn(name=”morning_minutes_note_id”,updatable=false,insertable=false), inverseJoinColumns=@JoinColumn(name=”item_type_id”,updatable=false,insertable=false)) public List<MorningMinutesNoteType> getItemTypes() { return itemTypes; } CREATE TABLE morning_minutes_note_item_type( morning_minutes_note_item_type_id BIGINT PRIMARY KEY DEFAULT NEXTVAL(‘morning_minutes_note_item_type_id_seq’), morning_minutes_note_id […]