wood burning stoves*
The moose likes Object Relational Mapping and the fly likes Criteria createAlias with addtional restrictions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Criteria createAlias with addtional restrictions" Watch "Criteria createAlias with addtional restrictions" New topic
Author

Criteria createAlias with addtional restrictions

Ka Erol
Greenhorn

Joined: Feb 19, 2013
Posts: 3
Hello,

I'm looking for solution how to add additional restriction do left outer join.

Actually I'm using:
crit.createAlias(VcInternalMail.PROPERTY_COMPANIES_RECIPIENT, "imc", CriteriaSpecification.LEFT_JOIN).add(Restrictions.eq("imc.idCompany", companyList));

But this give me restriction in where clause.

I want to get something like that
left outer join vc_internal_mail_company imc on imc.idInternalMail = this_.idInternalMail and imc.idCompany in (13)

Is it possible with Criteria ?

Kind regards
Karol R.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Criteria createAlias with addtional restrictions
 
Similar Threads
are these join same
Stumped on a SQL Statement
Left outer join
Querying Based On Member of Contained Collection
left outer join Vs right outer join