Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Cannot update object - Hibernate  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends!

Im using hibernate in my project, and I have a problem while trying to update a property of the object.

My object class is like this

private Integer perfilid;
private String nombre;
privateSet <Area> areas;


Whit the setters and getters. And the hbm is like this




The problem is that I cannot update the propertie "areas" . Im doing something wrong?

In the bean the update method I set this way the properties

perfilSelect.setNombre(nombre)
perfilSelect.setAreas(areas);
new PerfilHome().saveOrUpdate(perfilSelect);

Thanks in advance for the help!

Diego
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Diego,

Could you please add the error stack trace.
Also, i think that the mapping between Perfil should be one to many. please recheck that.

Thanks,
Komal
 
Diego Creador
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Komal!

That was the problem

Thanks a lot for the help

Regards
Diego
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!