Thanks.
I did Lazy annotation in the relationship as below.
| @OneToMany(fetch = FetchType.LAZY, mappedBy = "parentBoard")
| public Collection<Board> getChildBoards() {
| return childBoards;
| }
|
| public void setChildBoards(Collection<Board> childBoards) {
| this.childBoards = childBoards;
| }
|
And to obtain the root object and his children object , I call a method as
below.
So I can get just the Object and his children object.
| public void obtainOneLevelChild() {
|
| childBoards.size();
|
| }
|
I need not occur LazyInitializationException message in the console or log file
Regards.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950380#3950380
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3950380
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user