-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: How I can make outer join ?
PostPosted: Wed Mar 14, 2007 9:22 pm 
Newbie

Joined: Mon Jul 17, 2006 11:49 pm
Posts: 3
Location: Venezuela
[b]Hibernate version:3.1

[b]Mapping documents: It is not necessary.

[b]Name and version of the database you are using:Oracle 9i.

I have tried to understand joins in HQL, inner join, rigth to outer join and left to outer join, but I have not obtained it, with the examples that encounter in the www. Somebody can explain the meaning to me of each one of them with examples and that criterion to use for knowing when I use one or another one. It would thank for much that can help me.

_________________
Darlys Maldonado


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 14, 2007 11:30 pm 
Newbie

Joined: Tue Mar 13, 2007 9:49 pm
Posts: 8
you may try the criteria approach

for example , I wanna join the Product and Supplier , in which the product reference to supplier.
I try to outer join the supplier name

Code:
String supplierName = "bla bla bla";
Criteria criteria = createCriteria(Product.class);
criteria.createCriteria("prod_assoc_supp", Criteria.LEFT_JOIN).add(
                    Expression.like("supplierName", supplierName));



The point is to use "criteria.createCriteria(.....).add(criterion)"


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2007 10:46 am 
Newbie

Joined: Mon Jul 17, 2006 11:49 pm
Posts: 3
Location: Venezuela
aragon wrote:
you may try the criteria approach

for example , I wanna join the Product and Supplier , in which the product reference to supplier.
I try to outer join the supplier name

Code:
String supplierName = "bla bla bla";
Criteria criteria = createCriteria(Product.class);
criteria.createCriteria("prod_assoc_supp", Criteria.LEFT_JOIN).add(
                    Expression.like("supplierName", supplierName));



The point is to use "criteria.createCriteria(.....).add(criterion)"


Very I am been thankful

_________________
Darlys Maldonado


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.