It looks like this behavior isn't a bug (see quote from
http://docs.jboss.org/ejb3/app-server/HibernateAnnotations/reference/en/h...)
anonymous wrote : 2.2.5.5. Association fetching
| You have the ability to either eagerly or lazily fetch associated entities. The fetch
parameter can be set to FetchType.LAZY or FetchType.EAGER. EAGER will try to use an outer
join select to retrieve the associated object, while LAZY is the default and will only
trigger a select when the associated object is accessed for the first time. EJBQL also has
a fetch keyword that allows you to override laziness when doing a particular query. This
is very useful to improve performance and is decided on a use case to use case basis.
It is very inconvenient though. I suppose there's no work around other than using LAZY
Fetching.
However, should an outer join of a parent table to a sub-table using the parent's
primary key result in duplicate records? I'll have to do this manually to see
what's going on.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988410#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...