Post by:
Diego Creador
, Greenhorn
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
Post by:
Komal Renu
, Ranch Hand
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
Post by:
Diego Creador
, Greenhorn
Hello Komal!
That was the problem
Thanks a lot for the help
Regards
Diego
Everybody's invited. Except this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
This thread has been viewed 1391 times.
All times above are in ranch (not your local) time.
The current ranch time is
Apr 20, 2018 16:29:19.