Skip to content

Instantly share code, notes, and snippets.

@dbonillaf
Created June 1, 2010 16:53
Show Gist options
  • Save dbonillaf/421151 to your computer and use it in GitHub Desktop.
Save dbonillaf/421151 to your computer and use it in GitHub Desktop.
package com.six.model.entity;
import javax.persistence.*;
@Entity
@Table(name="ORDER_TABLE")
public class Order {
private int id;
private String address;
private Customer customer;
@Id
@Column(name="ORDER_ID")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Column(name="SHIPPING_ADDRESS")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@ManyToOne()
@JoinColumn(name="CUSTOMER_ID")
public Customer getCustomer() {
return customer;
}
public void setCustomer(Customer customer) {
this.customer = customer;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment