• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to refresh the relations of an entity when refereshing the entity itself ?

 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to two hibernate entities where's there's a relation between them: the entities are: Department and Students

in the Department entity which is Set students.

Now, what i want to is the following: When i load a department i automatically want all students to be re-loaded or loaded.

how can i do this ? do i have to change anything in the .hbm.xml file ?

Thanks in advance,
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i forgot to note something:

lets say that i have added a students that is related to the some department without changing the department itself, so how do i load the new added students ?

Thanks,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic