• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

problem with update on many-to-one hibernate relationship

Posts: 2
Netbeans IDE Postgres Database Debian
  • 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...

    Bookmark Topic Watch Topic
  • New Topic