-->
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.  [ 1 post ] 
Author Message
 Post subject: Help with joining tables
PostPosted: Mon Dec 15, 2003 10:25 am 
Newbie

Joined: Fri Dec 05, 2003 11:07 am
Posts: 14
I have 2 classes linking to Tables PickHead(OrderHeaders) and Custmastr.
I have created the mapping documents successfully and can retrieve data from each table. But I want to join the tables in a query like.
========================
select p.packslip, c.cust_name
from pickhead p, custmstr c
where p.cust_num = c.cust_num
order by c.cust_name
======================
How would I do this in HQL and retrieve the data sucessfully? Could I get a link to the documentation which has a similar example.
Thank you in advance for help

Here are my classes
===============
public class OrderID {
private String rowID;
private String ordID;
private String ordPicked;
private String ordShipped;
private String custID;



public String getCustID() {
return custID;
}

public String getOrdID() {
return ordID;
}

public String getOrdPicked() {
return ordPicked;
}

public String getOrdShipped() {
return ordShipped;
}

public String getRowID() {
return rowID;
}

public void setCustID(String string) {
custID = string;
}

public void setOrdID(String string) {
ordID = string;
}

public void setOrdPicked(String string) {
ordPicked = string;
}

public void setOrdShipped(String string) {
ordShipped = string;
}

public void setRowID(String string) {
rowID = string;
}

}

public class CustomerInfo {
private String rowID;
private String custID;
private String custName;


public String getCustID() {
return custID;
}

public String getCustName() {
return custName;
}

public String getRowID() {
return rowID;
}

public void setCustID(String string) {
custID = string;
}

public void setCustName(String string) {
custName = string;
}

public void setRowID(String string) {
rowID = string;
}

}


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

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.