开发者

How to replace entity in LQC?

I have Lazy Query Container (LQC) + hibernate connected to table. I don't want to display some collections at the table so some collections are lazy loaded.

When user select item (row) in table I want to open edit form with all data available. I have to initialize selected item - I get entity from Item, merge it back to context and call hibernate.initialize. it works fine, collections are initialized. But it is another instace then instance in container (because merge ret开发者_开发百科urns new instance)

  1. How can I replace non-initialzied item with this new one?
  2. Or how can I refresh the container and the table (how to select previously selected row in table after refresh?)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜