I know that it could be too much vague but what could cause a NullPointerException after adding a @ManyToMany in my jpa entities?
All code is the same, I deleted only the entity linked to the croos table and modified the two entities that before were linked to that entity adding @ManyToMany so the problem isn't the external code or in the db.
The two entities are also linked with a @OneToMany with a second field. Could be this the problem?
This is a structure of my database:
- table1: id, name, description and table2_id;
- table2: id, name and description;
- cross_table: id, table1_id, table2_id and timestamp
Could be a problem the two Set into the entity Table2?
My specs are:
- java8
- hibernate5.2
- jpa2.1