outer join « Default « JPA Q&A

1. Hibernate default joining for nullable many-to-one    stackoverflow.com

I have a hibernate mapping like this in a ProductDfn class

@ManyToOne( fetch = FetchType.LAZY, optional = true )
@JoinColumn( name = "productTypeFk", nullable = true )
public ProductType getProductType()
    return ...

2. Want Hibernate to use outer join as default in HQL    forum.hibernate.org

Hi, I am new bie at hibernate. I need someone's help. What I need hibernate to use left outer join in it's query as default. Suppose, I have two table 1) Employee 2) Task with one to many relationship. Now If I say findbyquery("select count(*) from Task t order by t.Employee.Name") Hibernate generate following query with inner join: select count(*) as ...