posted 8 years ago
Good evening everyone. It seems I hadn't understood the entity relationships well enough, and it breaks my program's functionality. Let me give you some quick info.
Users can register and buy courses. User entities and Course entities are Many-To-Many bidirectional with a Join table like so:
I thought that by simply doing a merge on the Course entity after I set the User, it would suffice. Clearly that's not the case and the changes aren't persisted in the database. I'm doing:
So what am I doing wrong?
Netbeans 11 - JavaEE 8 - WildFly 14 - Spring Boot 2.x