<?xml version= "1.0 " encoding= "utf-8 "?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN "
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd ">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name= "pojo.Player " table= "player " schema= "dbo " catalog= "NBA ">
<id name= "pid " type= "java.lang.Integer ">
<column name= "pid " />
<generator class= "native " />
</id>
<property name= "pname " type= "java.lang.String ">
<column name= "pname " length= "20 " not-null= "true " />
</property>
<many-to-one name= "team " class= "pojo.Team " column= "tid "> </many-to-one>
</class>
</hibernate-mapping>
package pojo;
/**
* Player generated by MyEclipse - Hibernate Tools
*/
public class Player implements java.io.Serializable {
// Fields
private Integer pid;
private String pname;
private Team team;
// Constructors
/** default constructor */
public Player() {
}
/** full constructor */
public Player(String pname, Team team) {
this.pname = pname;
this.team = team;
}
// Property accessors
public Integer getPid() {
return this.pid;
}
public void setPid(Integer pid) {
this.pid = pid;