Java/JPA persist return value -
i have 2 entities question
, publication
. publication has list of question. when persist question ok, check on database , row insersed (i'm using mysql).
then need show question of publication, , when select questions question persisted before not show.
i "select p publicacion
", returns publications questions , not new one. if stop sever , deploy again application web when show question of publication appears!
i dont know happening, dont know if someting memory or entity manager.
please im stuck
thanks
public t persist(t object){ entitymanager.persist(object); entitymanager.flush(); return object; }
Comments
Post a Comment