String sql="Select f.*,c.name fname,c.phone from e_financial_products f "
+ "left join e_financial_products_consultant c on f.id=c.product_id "
+ "where f.type_two=?1";
List<FinancialProductsBeanTest> list=entityManager.createNativeQuery(sql)
//设置参数
.setParameter(1, typeTwo)
.unwrap(org.hibernate.Query.class)
.setResultTransformer(Transformers.aliasToBean(FinancialProductsBeanTest.class)).list();
System.out.println(JSON.toJSONString(list));