• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem with update on many-to-one hibernate relationship  RSS feed

Jeferson Coli
Posts: 2
Debian Netbeans IDE Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

I have a problem with hibernate relationship many-to-one.

My system is commercial proposal controller, where has a responsible for proposal from user entity. When the proposal is create and set the responsible, has no problems, works fine. But when change the responsible and update, it changes the object, I can see in a datatable, but has no update in database. If I refresh on page the update disapears.

class proposal

User Class

DAO Code

In the User class I don't make any annotation about this relationship, it's a unidirectional relationship. The class proposal yet use the user class to make a user's bag, as participants, and this relationship will be unidirectional relationship too.

I tried to make annotations in user class but no works too.

User class with annotations

The class User has a many-to-one relationship with userType and it works fine.

Someone has any ideia about this? My head is too hot...

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!